class Graphic a where measureGraphicK :: a -> GCtx -> Cont (K b c) MeasuredGraphics measureGraphicListK :: [a] -> GCtx -> Cont (K d e) MeasuredGraphics instance Graphic PackedString instance Graphic BitmapFile instance (Graphic b) => Graphic (Drawing a b) instance Graphic Gfx instance Graphic FixedColorDrawing instance Graphic FixedDrawing instance Graphic FlexibleDrawing instance Graphic MeasuredGraphics instance Graphic PixmapImage instance Graphic Bool instance Graphic Char instance Graphic Double instance (Graphic a, Graphic b) => Graphic (Either a b) instance Graphic Float instance Graphic Int instance Graphic Integer instance (Graphic a) => Graphic (Maybe a) instance Graphic SmileyMode
Graphic collects types whose values have graphical representations
(just like the class
Show collects types whose values have textual
representations). Most basic types belong to this class. The library
also provides some new types for graphics.
The standard way to make a new type
T an instance of the
Graphic class is to define a function,
draw_T say, that convert
values of type
T into a type that is already in the
and then define the instance in the following way:
instance Graphic T where measureGraphicK = measureGraphicK . draw_T
The class methods are normally not used directly by the application programmer in any other way.
Types for graphics: Drawing, FixedDrawing, FlexibleDrawing, BitmapFile.
Fudgets that display graphics: hyperGraphicsF, displayF, labelF, buttonF, ...