All Manuals > CLIM 2.0 User Guide > 7 Defining a New Presentation Type

7.3 Using Views With CLIM Presentation Types

The present and accept presentation methods can define more than one view of the data. For example, a spreadsheet program might define a presentation type for revenue, which can be displayed either as a number or as a bar of a certain length in a bar graph. These two views might be implemented by specializing the view arguments for the textual-menu-view class and the user-defined bar-graph-view class. Typically, at least one canonical view should be defined for a presentation type. For example, the present method for the textual-menu-view view should be defined if the programmer wants to allow objects of that type to be displayed textually. A more concrete example is the dialog view of the member presentation type, which presents the choices in a "radio push-button" style.

CLIM currently supports textual, menu, and dialog views. Operators for views of CLIM presentation types are listed as follows.

view Protocol Class

Summary: The protocol class for view objects. If you want to create a new class that behaves like a view, it should be a subclass of view. Subclasses of view must obey the view protocol. All of the view classes are immutable.

viewp Function

viewp object

Summary: Returns t if object is a view; otherwise, it returns nil.

stream-default-view Generic Function

stream-default-view stream

Summary: Returns the default view for the extended stream stream. accept and present get the default value for the view argument from this.

(setf stream-default-view) Generic Function

(setf stream-default-view) view stream

Summary: Changes the default view for stream to the view view.

textual-menu-view Class

Summary: The class that represents the default view used inside menu-choose for frame managers that are not using a gadget-type look and feel.

textual-dialog-view Class

Summary: The class that represents the default view used inside accepting-values dialogs for frame managers that are not using a gadget-type look and feel.

gadget-menu-view Class

Summary: The class that represents the default view used inside menu-choose for frame managers using a gadget-type look and feel.

gadget-dialog-view Class

Summary: This subclass of gadget-view represents the default view used inside accepting-values dialogs for frame managers that are using a gadget-type look and feel.

pointer-documentation-view Class

Summary: The class that represents the default view that is used when computing pointer documentation.

+textual-menu-view+
+textual-dialog-view+
+gadget-menu-view+
+gadget-dialog-view+
+pointer-documentation-view+ Constants

Summary: These are objects of class textual-menu-view, textual-dialog-view, gadget-menu-view, gadget-dialog-view, and pointer-documentation-view, respectively.


CLIM 2.0 User Guide - 01 Dec 2021 19:38:57