The following functions are used to start up an application frame, exit from it, and control the "read-eval-print" loop of the frame (for example, redisplay the panes of the frame, and read, execute, enable, and disable commands).
run-frame-top-level [Generic Function]
Summary: Runs the top-level function for the frame frame . The default method on application-frame simply invokes the top-level function for the frame (which defaults to default-frame-top-level ).
Arguments: ( frame application-frame )
Summary: The :around method of run-frame-top-level on the application-frame class establishes the initial dynamic bindings for the application, including (but not limited to) binding *application-frame* to frame , binding *input-context* to nil , resetting the delimiter and activation gestures, and binding *input-wait-test* , *input-wait-handler* , and *pointer-button-press-handler* to nil .
default-frame-top-level [Generic Function]
Arguments: frame
&key
command-parser command-unparser partial-command-parser prompt
Summary: The default top-level function for application frames, this runs a "read-eval-print" loop that displays a prompt, calls read-frame-command and then execute-frame-command , and finally redisplays all the panes that need it. See 11.9, The CLIM Command Processor for further details.
default-frame-top-level also establishes a simple restart for abort and binds the standard stream variables as follows. *standard-input* will be bound to the value returned by frame-standard-input . *standard-output* will be bound to the value returned by frame-standard-output . *query-io* will be bound to the value returned by frame-query-io . *error-output* will be bound to the value returned by frame-error-output . It is unspecified what *terminal-io* , *debug-io* , and *trace-output* will be bound to.
prompt
is either a string to use as the prompt (defaulting to
Command:
) or a function of two arguments, a stream and the frame.
command-parser , command-unparser , and partial-command-parser are the same as for read-command . command-parser defaults to command-line-command-parser if there is an interactor; otherwise, it defaults to menu-only-command-parser . command-unparser defaults to command-line-command-unparser . partial-command-parser defaults to command-line-read-remaining-arguments-for-partial-command if there is an interactor; otherwise, it defaults to menu-only-read-remaining-arguments-for-partial-command . default-frame-top-level binds *command-parser* , *command-unparser* , and *partial-command-parser* to the values of command-parser , command-unparser , and partial-command-parser .
read-frame-command [Generic Function]
Summary: Reads a command from the stream stream on behalf of the frame frame . The returned value is a command object.
The default method (on standard-application-frame ) for read-frame-command simply calls read-command , supplying frame 's current command table as the command table.
execute-frame-command [Generic Function]
Summary: Executes the command command on behalf of the frame frame . command is a command object, that is, a cons of a command name and a list of the command's arguments.
The default method (on standard-application-frame ) for execute-frame-command simply applies the command-name of command to command-arguments of command .
command-enabled [Generic Function]
Summary: Returns t if the command named by command-name is presently enabled in the frame frame ; otherwise, it returns nil . If command-name is not accessible to the command table being used by frame , command-enabled returns nil .
Whether or not a particular command is currently enabled is stored independently for each instance of an application frame; this status can vary between frames that share a single command table.
(setf command-enabled) [Generic Function]
Arguments: enabled command-name frame
Summary: If enabled is nil , this disables the use of the command named by command-name while in the frame frame . If enabled is t , the use of the command is enabled. After the command has been enabled (or disabled), note-command-enabled (or note-command-disabled ) is invoked on the frame manager in order to update the appearance of the interface.
If command-name is not accessible to the command table being used by frame , using setf on command-enabled does nothing.
display-command-menu [Generic Function]
Arguments: frame stream
&key
command-table initial-spacing max-width max-height n-rows n-columns (cell-align-x
:left
) (cell-align-y
:top
)
Summary: Displays the menu associated with the specified command table on stream by calling display-command-table-menu . If command-table is not supplied, it defaults to (frame-command-table stream ). This function is generally used as the display function for panes that contain command menus.
initial-spacing , max-width , max-height , n-rows , n-columns , cell-align-x , and cell-align-y are as for formatting-item-list .
frame-exit
Summary: The restart that is invoked when frame-exit is called.
Summary: Exits from the frame frame . The default method (on standard-application-frame ) invokes the frame-exit restart.
panes-need-redisplay [Generic Function]
pane-needs-redisplay [Generic Function]
Summary: panes-need-redisplay indicates that all the panes in the frame frame should be redisplayed the next time around the command loop. pane-needs-redisplay causes only the pane pane within frame to be redisplayed; in this case, pane is either a pane or the name of a named pane.
redisplay-frame-pane [Generic Function]
Arguments: frame pane
&key
force-p
Summary: Causes the pane pane within the frame frame to be redisplayed immediately. pane is either a pane or the name of a named pane. When the boolean force-p is t , the maximum level of redisplay is forced and the pane is displayed "from scratch."
redisplay-frame-panes [Generic Function]
Summary: redisplay-frame-panes causes all of the panes in the frame frame to be redisplayed immediately by calling redisplay-frame-pane on each of the panes in frame that are visible in the current layout. When the boolean force-p is t , the maximum level of redisplay is forced and the pane is displayed "from scratch."
frame-replay [Generic Function]
Arguments: frame stream
&optional
region
Summary: Replays the contents of stream in the frame frame within the region specified by the region region , which defaults to the viewport of stream .
notify-user [Generic Function]
Arguments: frame message
&key
associated-window title documentation exit-boxes style text-style
Summary: Notifies the user of some event on behalf of the frame frame .
This function provides a look-and-feel independent way for applications to communicate messages to the user. For example, a frame manager might provide a top-level message window for each frame, or it might pop up an alert box.
frame is a CLIM application frame, message is a message string, associated-window is the window with which the notification will be associated, title is a title string to include in the notification, documentation is not implemented in the current version of CLIM, exit-boxes indicates what sort of exit boxes should appear in the notification, style is the style in which to display the notification, and text-style is the text style in which to display the notification.
frame-manager-notify-user [Generic Function]
Arguments: frame message
&key
associated-window title documentation exit-boxes style text-style
Summary: The generic function used by notify-user . The default method on standard-frame-manager will display a dialog or an alert box that contains the message and has exit boxes that will allow the user to dismiss the notification.
frame is a CLIM application frame, message is a message string, associated-window is the window with which the notification will be associated, title is a title string to include in the notification, documentation is not implemented in the current version of CLIM, exit-boxes indicates what sort of exit boxes should appear in the notification, style is the style in which to display the notification, and text-style is the text style in which to display the notification.
frame-properties [Generic Function]
(setf frame-properties) [Generic Function]
Arguments: value frame property
Summary: Frame properties can be used to associate frame specific data with frames without adding additional slots to the frame's class. CLIM may use frame properties internally to store information for its own purposes.