<<>> <> <> <> <> <> <> <> <> <<>> DIRECTORY Imager, Rope, ViewerClasses; Icons: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; IconFlavor: TYPE ~ ViewerClasses.IconFlavor; IconRef: TYPE ~ REF IconRep; Halfword: TYPE ~ CARD16; bitsPerHalfword: NAT ~ BITS[Halfword]; iconW: INT16 ~ 64; iconH: INT16 ~ 64; <> IconRep: TYPE ~ MACHINE DEPENDENT RECORD [ bits: PACKED ARRAY [0..iconH*iconW/bitsPerHalfword) OF Halfword, -- 64 x 64 bit pattern label: BOOL ¬ FALSE, -- label icon with viewer name? invertLabel: BOOL ¬ FALSE, -- label drawn with white bits if TRUE filler: [0..37777B] ¬ 0, -- unused lx, ly, lw, lh: INT16 ¬ 0, -- rectangle for label (from bottom left) fillerInt: INT16 ¬ 0, proc: DrawIconProc ¬ NIL -- proc to draw pattern ]; <> DrawIconProc: TYPE ~ PROC [flavor: IconFlavor, context: Imager.Context, x, y: INTEGER ¬ 0, label: ROPE ¬ NIL]; DrawIcon: DrawIconProc; <> NewIcon: PROC [info: IconRef] RETURNS [newFlavor: IconFlavor]; <> NewIconFromFile: PROC [file: ROPE, n: CARDINAL] RETURNS [newFlavor: IconFlavor]; <> <> IconFileFormat: TYPE ~ MACHINE DEPENDENT RECORD [ bits: PACKED ARRAY [0..iconH*iconW/bitsPerHalfword) OF Halfword ¬ ALL[0], -- 128 (32 bit words) label: BOOL ¬ FALSE, -- 1 bit invertLabel: BOOL ¬ FALSE, -- 1 bit filler: [0..37777B] ¬ 0, -- leftovers, 14 bits lx, ly, lw, lh: INT16 ¬ 0, fillerInt: INT16 ¬ 0, empty: PACKED ARRAY [0..250) OF Halfword ¬ ALL[0] -- leftovers ]; END.