Next Prev Up Top Contents Index

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-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-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]	

Arguments: object

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

stream-default-view [Generic Function]

Arguments: stream

Summary: Returns the default view for the extended stream stream . accept and present get the default value for the view argument from this. All extended input and output streams must implement a method for this generic function.

(setf stream-default-view) [Generic Function]

Arguments: view stream

Summary: Changes the default view for stream to the view view . All extended input and output streams must implement a method for this generic function.

Many CLIM streams will have the textual view +textual-view+ as their default view. Inside menu-choose , the default view will be +menu-view+ . Inside accepting-values , the default view will be +dialog-view+ .

textual-view

Summary: The class representing all textual views, a subclass of view . Presentation methods that apply to a textual view must only do textual input and output (such as read-char and write-string ).

textual-menu-view

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

textual-dialog-view

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

gadget-view

Summary: The class representing all gadget views, a subclass of view .

gadget-menu-view

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

gadget-dialog-view

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

Summary: The class that represents the default view that is used when computing pointer documentation. It is a subclass of textual-view .

+textual-view+

+textual-menu-view+

+textual-dialog-view+

+gadget-view+

+gadget-menu-view+

+gadget-dialog-view+

+pointer-documentation-view+

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


Common Lisp Interface Manager 2.0 User Guide - 14 Dec 2001

Next Prev Up Top Contents Index