Next Prev Up Top Contents Index

9.10 Advanced Topics

The material in this section is advanced; most CLIM programmers can skip to the next section. It describes the functions that interface application frames to the presentation type system. All classes that inherit from application-frame must inherit or implement methods for all of these functions. 9.8, Application Frame Operators and Accessors.

frame-maintain-presentation-histories [Generic Function]

Arguments: frame

Summary: Returns t if the frame frame maintains histories for its presentations; otherwise, it returns nil . The default method (on standard-application-frame ) returns t if and only if the frame has at least one interactor pane.

frame-find-innermost-applicable-presentation [Generic Function]

Arguments: frame input-context stream x y &key event

Summary: Locates and returns the innermost applicable presentation on the window stream whose sensitivity region contains the point (x, y) , on behalf of the frame frame in the input context input-context . event defaults to nil , and is as for find-innermost-applicable-presentation .

The default method (on standard-application-frame ) simply calls find-innermost-applicable-presentation .

frame-input-context-button-press-handler [Generic Function]

Arguments: frame stream button-press-event

Summary: This function handles user pointer events on behalf of the frame frame in the input context *input-context* . stream is the window on which button-press-event took place.

The default implementation (on standard-application-frame ) unhighlights any highlighted presentations, finds the applicable presentation by calling frame-find-innermost-applicable-presentation-at-position , and then calls throw-highlighted-presentation to execute the translator on that presentation that corresponds to the user's gesture.

If frame-input-context-button-press-handler is called when the pointer is not over any applicable presentation, throw-highlighted-presentation must be called with a presentation of *null-presentation* .

frame-document-highlighted-presentation [Generic Function]

Arguments: frame presentation input-context window x y stream

Summary: This function produces pointer documentation on behalf of the frame frame in the input context input-context on the window window at the point (x, y) . The documentation is displayed on the stream stream .

The default method (on standard-application-frame ) produces documentation that corresponds to calling document-presentation-translator on all of the applicable translators in the input context input-context . presentation , window , x , y , and stream are as for document-presentation-translator .

Typical pointer documentation consists of a brief description of each translator that is applicable to the specified presentation in the specified input context, given the current modifier state for the window. For example, the following documentation might be produced when the pointer is pointing to the Lisp expression '(1 2 3) when the input context is form :

Left: '(1 2 3); Middle: (DESCRIBE '(1 2 3)); Right: Menu

frame-drag-and-drop-feedback [Generic Function]

Arguments: frame presentation stream initial-x initial-y new-x new-y state

Summary: The default feedback function for translators defined by define-drag-and-drop-translator , which provides visual feedback during the dragging phase of such translators on behalf of the frame frame . presentation is the presentation being dragged on the stream stream . The pointing device was initially at the position specified by initial-x and initial-y , and is at the position specified by new-x and new-y when frame-drag-and-drop-feedback is invoked. (Both positions are supplied for "rubber-banding," if that is the sort of desired feedback.) state will be either :highlight , meaning that the feedback should be drawn, or :unhighlight , meaning that the feedback should be erased.

frame-drag-and-drop-highlighting [Generic Function]

Arguments: frame presentation stream state

Summary: The default highlighting function for translators defined by define-drag-and-drop-translator , which is invoked when a "to object" should be highlighted during the dragging phase of such translators on behalf of the frame frame . presentation is the presentation over which the pointing device is located on the stream stream . state will be either :highlight , meaning that the highlighting for the presentation should be drawn, or :unhighlight , meaning that the highlighting should be erased.


Common Lisp Interface Manager 2.0 User Guide - 14 Dec 2001

Next Prev Up Top Contents Index