The protocol class that corresponds to an application frame. If you want to create a new class that behaves like an application frame, it should be a subclass of application-frame. All instantiable subclasses of application-frame must obey the application frame protocol. [annotate] All application frame classes are mutable. [annotate] |
Returns true if object is an application frame, otherwise returns false. [annotate] |
:name | [Initarg] |
:pretty-name | [Initarg] |
:command-table | [Initarg] |
:disabled-commands | [Initarg] |
:panes | [Initarg] |
:menu-bar | [Initarg] |
:calling-frame | [Initarg] |
:state | [Initarg] |
:properties | [Initarg] |
All subclasses of application-frame must handle these initargs, which are used to specify, respectively, the name, pretty name, command table, initial set of disabled commands, the panes, the menu bar, calling frame, state, and initial properties for the frame. [annotate] Note: Which each mean what, exactly? Hyperlinks to specification would help here. [edit]-- Matt Seddon 2020-01-23 23:59Z Note: Sure. But you may want to look at some of the hyperlinks below, which are reverse links from places where one of these initargs are mentioned. [edit]-- Gilbert Baumann 2022-06-13 14:58Z [← 27.1 Commands, define-command] [← 30.2 Abstract Gadgets] [← 29.2 Basic Pane Construction, make-pane] [← 29.2 Basic Pane Construction] [← 28.5.2 Frame Manager Operations, find-pane-for-frame] [← 28.5.2 Frame Manager Operations, generate-panes] [← 28.2.1 Specifying the Panes of a Frame] [← 28.2 Defining and Creating Application Frames, with-application-frame] [← 28.2 Defining and Creating Application Frames, define-application-frame] |
Defines a frame and CLOS class named by the symbol name that inherits from superclasses and has state variables specified by slots. superclasses is a list of superclasses that the new class will inherit from (as in defclass). When superclasses is nil, it behaves as though a superclass of standard-application-frame was supplied. slots is a list of additional slot specifiers, whose syntax is the same as the slot specifiers in defclass. Each instance of the frame will have slots as specified by these slot specifiers. These slots will typically hold any per-instance frame state. [annotate] options is a list of defclass-style options, and can include the usual defclass options, plus any of the following: [annotate] Note: CHANGE-SPACE-REQUIREMENTS also mentions an :resize-frame option which
is missing here. [edit]-- Gilbert Baumann 2003-03-16 14:48Z
The name, superclasses, and slots arguments are not evaluated. The values of each of the options are evaluated. [annotate] [← 30.2 Abstract Gadgets] [← 29.3.4 The Layout Protocol, change-space-requirements] [← 29.3.4 The Layout Protocol] [← 29.2 Basic Pane Construction, make-pane] [← 29.2 Basic Pane Construction] [← 28.5.2 Frame Manager Operations, find-pane-for-frame] [← 28.5.2 Frame Manager Operations, generate-panes] [← 28.2 Defining and Creating Application Frames, make-application-frame] [← 28.2 Defining and Creating Application Frames, standard-application-frame] [← 27.1 Commands, define-command] |
make-application-frame | frame-name &rest options &key pretty-name frame-manager enable state left top right bottom width height save-under frame-class &allow-other-keys | [Function] |
Makes an instance of the application frame of type frame-class. If frame-class is not supplied, it defaults to frame-name. [annotate] The size options left, top, right, bottom, width, and height can be used to specify the initial size of the frame. If they are unsupplied and :geometry was supplied to define-application-frame, then these arguments default from the specified geometry. [annotate] options are passed as additional arguments to make-instance, after the pretty-name, frame-manager, enable, state, save-under, frame-class, and size options have been removed. [annotate] If save-under is true, then the sheets used to implement the user interface of the frame will have the "save under" property, if the host window system supports it. [annotate] If frame-manager is provided, then the frame is adopted by the specified frame manager. If the frame is adopted and either of enable or state are provided, the frame is pushed into the given state. [annotate] Once a frame has been create, run-frame-top-level can be called to make the frame visible and run its top-level function. [annotate] |
The current application frame. The global value is CLIM's default application, which serves only as a repository for whatever internal state is needed by CLIM to operate properly. This variable is typically used in the bodies of command to gain access to the state variables of the application frame, usually in conjunction with with-slots or slot-value. [annotate] [← 28.4 The Generic Command Loop, run-frame-top-level] [← 28.4 The Generic Command Loop] [← 27.6.1 Command Presentation Types, command-or-form] [← 27.6.1 Command Presentation Types, command-name] [← 27.6.1 Command Presentation Types, command] [← 27.1 Commands, define-command] [← 23.7.3 Finding Applicable Presentations, highlight-applicable-presentation] [← 23.7.3 Finding Applicable Presentations, find-innermost-applicable-presentation] [← 23.7.1 Defining Presentation Translators, define-presentation-translator] |
This macro provides lexical access to the "current" frame for use with commands and the :pane, :panes, and :layouts options. frame is bound to the current frame within the context of one of those options. [annotate] frame is a symbol; it is not evaluated. body may have zero or more declarations as its first forms. [annotate] |
Applies the function function to all of the application frames that "match" port and frame-manager. If neither port nor frame-manager is supplied, all frames are considered to match. If frame-manager is supplied, only those frames that use that frame manager match. If port is supplied, only those frames that use that port match. [annotate] function is a function of one argument, the frame. It has dynamic extent. [annotate] |
Destroys the application frame frame. [annotate] |
Raises the application frame frame to be on top of all of the other host windows by invoking raise-sheet on the frame's top-level sheet. [annotate] |
Buries the application frame frame to be underneath all of the other host windows by invoking bury-sheet on the frame's top-level sheet. [annotate] |
The panes of a frame can be specified in one of two different ways. If the frame has a single layout and no need of named panes, then the :pane option can be used. Otherwise if named panes or multiple layouts are required, the :panes and :layouts options can be used. Note that the :pane option is mutually exclusive with :panes and :layouts. It is meaningful to define frames that have no panes at all; the frame will simply serve as a repository for state and commands. [annotate]
Panes and gadgets are discussed in detail in Chapter 29 and Chapter 30. [annotate]
The value of the :pane option is a form that is used to create a single (albeit arbitrarily complex) pane. For example: [annotate]
(vertically () (tabling () ((horizontally () (make-pane 'toggle-button) (make-pane 'toggle-button) (make-pane 'toggle-button)) (make-pane 'text-field)) ((make-pane 'push-button :label "a button") (make-pane 'slider))) (scrolling () (make-pane 'application-pane :display-function 'a-display-function)) (scrolling () (make-pane 'interactor-pane)))
If the :pane option is not used, a set of named panes can be specified with the :panes option. Optionally, :layouts can also be used to describe different layouts of the set of panes. [annotate]
The value of the :panes option is a list, each entry of which is of the form (name . body). name is a symbol that names the pane, and body specifies how to create the pane. body is either a list containing a single element that is itself a list, or a list consisting of a symbol followed by zero or more keyword-value pairs. In the first case, the body is a form exactly like the form used in the :pane option. In the second case, body is a pane abbreviation where the initial symbol names the type of pane, and the keyword-value pairs are pane options. For gadgets, the pane type is the class name of the abstract gadget (for example, slider or push-button). For CLIM stream panes, the following abbreviations are defined: [annotate]
See Chapter 29 and Chapter 30 for more information on the individual pane and gadget classes, and the options they support. [annotate]
An example of the use of :panes is: [annotate]
(:panes (buttons (horizontally () (make-pane 'push-button :label "Press me") (make-pane 'push-button :label "Squeeze me"))) (toggle toggle-button :label "Toggle me") (interactor :interactor :width 300 :height 300) (application :application :display-function 'another-display-function :incremental-redisplay t))
The value of the :layouts option is a list, each entry of which is of the form (name layout). name is a symbol that names the layout, and layout specifies the layout. layout is a form like the form used in the :pane option, with the extension to the syntax such that the name of a named pane can be used wherever a pane may appear. (This will typically be implemented by using symbol-macrolet for each of the named panes.) For example, assuming a frame that uses the :panes example above, the following layouts could be specified: [annotate]
(:layouts (default (vertically () button toggle (scrolling () application) interactor)) (alternate (vertically () (scrolling () application) (scrolling () interactor) (horizontally () button toggle))))
The syntax for :layouts can be concisely expressed as: [annotate]