Groups are one of the major workhorse objects in the PDP++ software. Virtually every object is contained in a group object. Thus, groups provide a way of managing other objects, creating them, ordering them, and iterating through them.
A particular group typically manages objects of the same type. Thus, a group of units always contains units of one form or another. Groups have a default type of object that they expect to contain, and this is what they will create if asked to create a new object.
Groups also have a notion of a default element, which can be useful. For example, the default element of the group of color specifications on the root object is the default color spec that will be used by all windows that need a color spec.
There are two basic types of groups. The simpler form of group is actually just a List. A List object manages a single list of elements, and does not allow for any sub-grouping of these elements. Lists are used to hold simple objects that probably don't need to have such subgroups.
A Group may also contain subgroups, which are similar in type to the group itself. The nested structure of subgroups within subgroups within groups can be organized into a conceptual "tree" of groups and elements. The initial group comprises the base of the tree with each of its subgroups representing a branch. The subgroup's subgroups continually branch off until in the end a group is reached without any further subgroups. The actual elements of the group are conceptually represented as "leaves", and may occur within any group at any level of the group tree.
Ex: __(initial group)____ / | \ \ \ (subgroup1) (subgroup2) el6 el7 el8 / | \ | \ (subgroup11) el2 el3 (subgroup21)(subgroup22) | | \ el1 el4 el5
In this example there are six groups and eight "leaf" elements. The
leaves are numbered in their Depth First Search retrieval order which is
used by the Leaf()
function described in the group functions
section See section 8.2.3 Group Functions.
In some cases it useful for the same group element to occur in more than
one group at time. The parent groups share the element, however, one
group is assigned to be the owner (usually the initial group the element
was created within). Usually a group will own all of its elements, but
sometimes it may contain elements from other groups as well. Those
elements which are owned by other groups are known as linked
elements, and are added to a group by using the Link()
function
described in the group functions section. When a group is deleted, it
breaks its link to the linked elements, but does not delete them as it
does the other elements it owns. Subgroups can also be linked.
Ex: (group1) (group2) / | \ / | \ (subgroup1) el1 \.............el2 el3 \ / \ \ el4 \...................................(subgroup2)
In this example group1 has a link to element el2 in group2. El2 is owned by group2 and is a link element of group1. In addition, subgroup1 has a link to subgroup2, which is owned by group2.
The following sections document the various operations and variables of the group types. These are probably of most interest to users who will be manipulating groups in the CSS language, or in programming in PDP++. However, some of the group functions are available in the Actions menu in the gui, and their function might not be fully clear from their name and arguments.