Nouns for thinker
- ARexx ports
- An ARexx port provides a context for operations from the script.
Scripts started from a running Thinker are given newly created port to
use. There is a global port "Thinker" (or "Thinker#" if more than one
thinker is running) that external programs can contact to issue
thinker commands. Most commands are not valid until the script has
obtained a private port.
- Window
- An ARexx port has at most one window associated with it. Commands
change the display will change that window. Commands that need to use
multiple windows can address multiple Thinker ports. When started from
the keyboard, the active window is the window attached to the port.
Windows are represented by a string of the form: "#/#/#/#"
- File
- A file name is a text string, enclosed in quotes. As with windows,
each port has an open file associated with it. Other files may be open
and in use via markers.
- Position Markers
- Many commands have a reference to a statement, and possibly even
to a text offset inside that statement. These are represented as
"position markers", which the ARexx script sees as a token. A position
marker includes a file name, a statement in that file, and a text
offset into that statement.
- Current Position
- Every port has a default position marker that is named "current".
When started from the keyboard, the anchor statement of the active
window with text offset 0 is the current position, unless there is a
text cursor visible in the window, in which case that represents the
active window. This is true for any running macro with an associated
window; if it has no open window and has not otherwise been given a
current marker, it has no current marker, and any command trying to
use that marker will result in an error.
- Links
- Links are a way of naming a statement by it's relation to the
current statement. The tokens include: up, down, succeeding,
preceding, origin, a text string or next. A text string indicates a
statement by name; next indicates the next statement with the same
label.
- Text
- Text is represented by quoted strings, using either double or
single quotes to note the start and end of the text. Text in the
thinker document is noted by either a marker and a length, or a pair
of markers in the same statement. A length of -1 indicates "to the end
of the statement".
- Clipboard
- The clipboard holds text strings, and can be used by scripts to
communicate with other scripts, or the user.
- Styles
- Styles are added to the text in a thinker document, and include
numbers (1, 2 and 3) for foreground and background pens, and any of
the attributes bold, italic or underlined, or possibly plain to
indicate the absence of all three attributes.
- Behaviors
- Behaviors are flags that control the global behavior of Thinker.
Most are boolean, but some have string values (at this time,
"linkfile" and "font"). In a Rexx program, behaviors are represented
by a string as a list of words, each word being of the form
"name=value". Values for booleans are either "on", "true" or "1" for
enabled behaviors, and "off", "false" or "0" for disabled behaviors.
"Target" when set, indicates that this scripts window is the current
jump target.
- Options
- Options are flags that control the behavior of Thinker in a single
window. The are treated identically to behaviors, except that they
have different names, and some of them (currently "clip", "spacing"
and "lines") have numeric values.
- Branches
- A branch consists of a root statement, and one or more subordinate
branches. They are represented in a Rexx script as stemmed variables,
and passed between thinker and the script via the RVI. If "branchname"
is a Rexx stem name holding a branch, then "branchname" has the text
of the statement; "branchname.0" has the number of children of that
statement, and "branchname.i" for each i from 1 to branchname.0 is a
child statment. A branch in a thinker document is noted from ARexx by
a marker or a link.
- Groups
- A group is a sequence of sibling statements, denoted by the two
end statements in the parents list of children. In a Rexx script, a
group is a stemmed variable identical to a branch, except that the
"groupname" variable which normally holds the text of the root
statement has no defined meaning. A group in a Thinker document is
represented in a Rexx script by two markers or links.
- Plex
- A Plex is a group that includes all the siblings of a statement.
It's representation is the same as a group, but it can be indicated in
thinker by choosing a single statement instead of the two endpoints. A
plex in a thinker document is noted in ARexx by a marker or a link.
On to the verbs,
or up to the design.
Mike W. Meyer