Next Prev Up Top Contents Index

9.8.1 CLIM Application Frame Accessors

The following functions may be used to access and modify the state of the application frame itself, such as what the currently exposed panes are, what the current layout is, what command table is being used, and so forth.

*application-frame* 

Summary: The current application frame. The value is CLIM's default application. This variable is typically used in the bodies of commands and translators to gain access to the state variables of the application, usually in conjunction with clos:with-slots or clos:slot-value .

frame-name [Generic Function]

Arguments: frame

Summary: Returns the name of the frame frame , which is a symbol.

frame-pretty-name [Generic Function]

Arguments: frame

Summary: Returns the "pretty name" of the frame frame , which is a string.

(setf frame-pretty-name) [Generic Function]

Arguments: name frame

Summary: Sets the pretty name of the frame frame to name , which must be a string.

frame-command-table [Generic Function]

Arguments: frame

Summary: Returns the command table for the frame frame .

(setf frame-command-table) [Generic Function]

Arguments: command-table frame

Summary: Sets the command table for the frame frame to command-table . Changing the frame's command table will redisplay the command menus (or menu bar) as needed. command-table is a command table designator.

frame-standard-input [Generic Function]

Arguments: frame

Summary: Returns the stream that will be used for *standard-input* for the frame frame . The default method (on standard-application-frame ) returns the first named pane of type interactor-pane that is exposed in the current layout; if there is no such pane, the value returned by frame-standard-output is used.

frame-standard-output [Generic Function]

Arguments: frame

Summary: Returns the stream that will be used for *standard-output* for the frame frame . The default method (on standard-application-frame ) returns the first named pane of type application-pane that is exposed in the current layout; if there is no such pane, it returns the first pane of type interactor-pane that is exposed in the current layout.

To redirect standard input or output, simply redefine the corresponding frame generic function. For example, the following form specifies the pane in my-frame named output-pane as the destination for standard output.

(defmethod frame-standard-output ((frame my-frame))
(get-frame-pane frame 'output-pane))

frame-query-io [Generic Function]

Arguments: frame

Summary: Returns the stream that will be used for *query-io* for the frame frame . The default method (on standard-application-frame ) returns the value returned by frame-standard-input ; if that is nil , it returns the value returned by frame-standard-output .

frame-error-output [Generic Function]

Arguments: frame

Summary: Returns the stream that will be used for *error-output* for the frame frame . The default method (on standard-application-frame ) returns the same value as frame-standard-output .

*pointer-documentation-output* 

Summary: This will be bound either to nil or to a stream on which pointer documentation will be displayed.

frame-pointer-documentation-output [Generic Function]

Arguments: frame

Summary: Returns the stream that will be used for *pointer-documentation-output* for the frame frame . The default method (on standard-application-frame ) returns the first pane of type pointer-documentation-pane . If this returns nil , no pointer documentation will be generated for this frame.

frame-calling-frame [Generic Function]

Arguments: frame

Summary: Returns the application frame that invoked the frame frame .

frame-parent [Generic Function]

Arguments: frame

Summary: Returns the object that acts as the parent for the frame frame . This often, but not always, returns the same value as frame-manager .

frame-panes [Generic Function]

Arguments: frame

Summary: Returns a list of all of the frame frame 's named panes. This includes panes in the current layout, and panes in other layouts as well. If there are no named panes (that is, the :pane option was used), only the single, top-level pane is returned. This function returns objects that reveal CLIM's internal state; do not modify those objects.

frame-current-panes [Generic Function]

Arguments: frame

Summary: Returns a list of those named panes in the frame frame 's current layout. If there are no named panes (that is, the :pane option was used), only the single, top-level pane is returned. This function returns objects that reveal CLIM's internal state; do not modify those objects.

get-frame-pane [Generic Function]

Arguments: frame pane-name

Summary: Returns the CLIM stream pane in the frame frame whose name is pane-name .

find-pane-named [Generic Function]

Arguments: frame pane-name

Summary: Returns the pane in the frame frame whose name is pane-name . This can return any type of pane, not just CLIM stream panes.

frame-top-level-sheet [Generic Function]

Arguments: frame

Summary: Returns the sheet that is the top-level sheet for the frame frame . This is the sheet that has as its descendants all of the panes of frame .

frame-pane [Generic Function]

Arguments: frame

Summary: Returns the pane that is the top-level pane of the current layout of the frame.

frame-current-layout [Generic Function]

Arguments: frame

Summary: Returns the current layout for the frame frame . The layout is named by a symbol.

(setf frame-current-layout) [Generic Function]

Arguments: layout frame

Summary: Sets the layout of the frame frame to be the new layout specified by new-layout . layout must be a symbol that names one of the possible layouts.

Changing the layout of the frame causes a recomputation of what panes are used for the bindings of the standard stream variables (such as *standard-input* ). After the new layout has been computed, the contents of each pane are displayed to the degree necessary to ensure that all output is visible.

layout-frame [Generic Function]

Arguments: frame &optional width height

Summary: Resizes the frame and lays out the current pane hierarchy using the layout specified by frame-current-layout , according to the layout protocol described in 10.2.4, The Layout Protocol. This function is automatically invoked on a frame when it is adopted, after its pane hierarchy has been generated.

If width and height are provided, then this function resizes the frame to the specified size. It is an error to provide just width . If no optional arguments are provided, this function resizes the frame to the preferred size of the top-level pane as determined by the space composition pass of the layout protocol.

In either case, after the frame is resized, the space allocation pass of the layout protocol is invoked on the top-level pane.


Common Lisp Interface Manager 2.0 User Guide - 14 Dec 2001

Next Prev Up Top Contents Index