Next Prev Up Top Contents Index

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]

Arguments: sheet

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

sheet-children [Generic Function]

Arguments: 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]

Arguments: 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, the sheet-already-has-
parent
error will be signaled.

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]

Arguments: 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]

Arguments: 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]

Arguments: 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]

Arguments: 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]

Arguments: sheet

bury-sheet [Generic Function]

Arguments: 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]

Arguments: 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]

Arguments: 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]

Arguments: 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]

Arguments: sheet

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

sheet-occluding-sheets [Generic Function]

Arguments: 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.


CommonLisp Interface Manager 2.0 User's Guide - 8 Aug 2003

Next Prev Up Top Contents Index