All Manuals > CLIM 2.0 User Guide > 18 Sheets

18.3 Relationships Between Sheets

Sheets are arranged in a tree-structured, acyclic, top-down hierarchy. Thus, in general, a sheet has one or no parents and zero or more children. A sheet may have zero or more siblings (that is, other sheets that share the same parent). In order to describe the relationships between sheets, we define the following terms.

18.3.1 Sheet Relationship Functions

The generic functions in this section comprise the sheet protocol. All sheet objects must implement or inherit methods for each of these generic functions.

sheet-parent Generic Function

sheet-parent sheet

Summary: Returns the parent of the sheet sheet, or nil if the sheet has no parent.

sheet-children Generic Function

sheet-children sheet

Summary: Returns a list of sheets that are the children of the sheet sheet. Some sheet classes support only a single child; in this case, the result of sheet-children will be a list of one element. This function returns objects that reveal CLIM's internal state; do not modify those objects.

sheet-adopt-child Generic Function

sheet-adopt-child sheet child

Summary: Adds the child sheet child to the set of children of the sheet sheet, and makes the sheet the child's parent. If child already has a parent, an

Some sheet classes support only a single child. For such sheets, attempting to adopt more than a single child will cause the sheet-supports-only-one-child error to be signaled.

sheet-disown-child Generic Function

sheet-disown-child sheet child &key (errorp t)

Summary: Removes the child sheet child from the set of children of the sheet sheet, and makes the parent of the child be nil. If child is not actually a child of sheet and errorp is t, then the sheet-is-not-child error will be signaled.

sheet-siblings Generic Function

sheet-siblings sheet

Summary: Returns a list of all of the siblings of the sheet sheet. The sibling are all of the children of sheet's parent excluding sheet itself. This function returns fresh objects that may be modified.

sheet-enabled-children Generic Function

sheet-enabled-children sheet

Summary: Returns a list of those children of the sheet sheet that are enabled. This function returns fresh objects that may be modified.

sheet-ancestor-p Generic Function

sheet-ancestor-p sheet putative-ancestor

Summary: Returns t if the the sheet putative-ancestor is in fact an ancestor of the sheet sheet; otherwise, it returns nil.

raise-sheet Generic Function

raise-sheet sheet

bury-sheet Generic Function

bury-sheet sheet

Summary: These functions reorder the children of a sheet by raising the sheet sheet to the top or burying it at the bottom. Raising a sheet puts it at the beginning of the ordering; burying it puts it at the end. If sheets overlap, the one that appears "on top" on the display device is earlier in the ordering than the one underneath.

This may change which parts of which sheets are visible on the display device.

reorder-sheets Generic Function

reorder-sheets sheet new-ordering

Summary: Reorders the children of the sheet sheet to have the new ordering specified by new-ordering. new-ordering is an ordered list of the child sheets; elements at the front of new-ordering are "on top" of elements at the rear.

If new-ordering does not contain all of the children of sheet, the sheet-ordering-underspecified error will be signaled. If new-ordering contains a sheet that is not a child of sheet, the sheet-is-not-child error will be signaled.

sheet-enabled-p Generic Function

sheet-enabled-p sheet

Summary: Returns t if the the sheet sheet is enabled by its parent; otherwise, it returns nil. Note that all of a sheet's ancestors must be enabled before the sheet is viewable.

(setf sheet-enabled-p) Generic Function

(setf sheet-enabled-p) enabled-p sheet

Summary: When enabled-p is t, this enables the the sheet sheet. When enabled-p is nil, this disables the sheet.

Note that a sheet is not visible unless it and all of its ancestors are enabled.

sheet-viewable-p Generic Function

sheet-viewable-p sheet

Summary: Returns t if the sheet sheet and all its ancestors are enabled, and if one of its ancestors is a graft. See 19 Ports, Grafts, and Mirrored Sheets for further information on grafts.

sheet-occluding-sheets Generic Function

sheet-occluding-sheets sheet child

Summary: Returns a list of the sheet child's siblings that occlude part or all of the region of the child. In general, these are the siblings that are enabled and appear earlier in the sheet sheet's children. If sheet does not permit overlapping among its children, sheet-occluding-sheets will return nil.

This function returns fresh objects that may be modified.

18.3.2 Sheet Genealogy Classes

Different "mix-in" classes are provided that implement the relationship protocol.

sheet-parent-mixin Class

Summary: This class is mixed into sheet classes that have a parent.

sheet-leaf-mixin Class

Summary: This class is mixed into sheet classes that will never have children.

sheet-single-child-mixin Class

Summary: This class is mixed into sheet classes that have at most a single child.

sheet-multiple-child-mixin Class

Summary: This class is mixed into sheet classes that may have zero or more children.


CLIM 2.0 User Guide - 01 Dec 2021 19:39:01