data Name = Name String instance ColorGen Name instance FontGen Name instance Eq Name instance Show Name class ColorGen a where convColorK :: (FudgetIO d) => a -> Cont (d b c) Pixel data ColorSpec = (ColorGen ?a) => ColorSpec ?a instance ColorGen ColorSpec data ColorFallback = CF ColorName ColorName instance ColorGen ColorFallback colorSpec :: (ColorGen a) => a -> ColorSpec class FontGen a where convFontK :: (FudgetIO d) => a -> Cont (d b c) FontStruct data FontSpec = (FontGen ?a) => FontSpec ?a instance FontGen FontSpec data FontStruct instance FontGen FontStruct instance Eq FontStruct instance Ord FontStruct instance Show FontStruct fontSpec :: (FontGen a) => a -> FontSpec
Types and classes for specifying colors and fonts in various ways.
Fonts and colors can be specified using Names (strings). These will automatically converted to appropriate GCIds, FontIds and Pixels when needed.
For efficiency, fonts, colors and other drawing attributes can also be allocated once and for all in advance using e.g. wCreateGCtx.
The new way, suitable in combination with Drawings: GCtx.
The old way: loadQueryFontF, allocNamedColorF, wCreateGC.
The methods in classes colorGen
and FontGen
should not be
exported, since they differ depending on whether the Haskell compiler
in use supports existentiall types.
This page documents work progress. Information on this page is subject to change without notice and does not represent a commitment on the part of the Fudgets corporation.