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.  Icons.mesa Copyright Σ 1985, 1986, 1987, 1988, 1991 by Xerox Corporation. All rights reserved. Edited by McGregor on August 16, 1982 11:19 am Last Edited by: Maxwell, December 17, 1982 9:57 am Bier, December 15, 1988 5:46:40 pm PST Doug Wyatt, January 19, 1987 10:27:32 pm PST Pier, November 18, 1988 2:31:46 pm PST Michael Plass, September 24, 1991 10:34 am PDT KAP for PCedar November 18, 1988 This record is MACHINE DEPENDENT so that it is compact and easy to copy from the IconFileFormat described below. Draw an icon in a context Create a new icon type Create a new icon type from the n'th icon read from the file Icon File Format (for wizards/hackers). Icons must be packed into the file at two pages per icon, corresponding to a logical record type as follows: ΚΠ•NewlineDelimiter –(cedarcode) style™codešΟc ™ Kšœ ΟeœI™TKš.™.Kšœ2™2K™&K™,K™&K™.K™—šΟk ˜ Kšœ˜—K˜KšΠblœŸ˜šœŸ˜K˜KšŸœŸœŸœ˜Kšœ Ÿœ˜,Kšœ ŸœŸœ ˜Kšœ ŸœŸœ˜KšœŸœŸœ ˜&K˜KšœŸœ˜KšœŸœ˜K˜K˜Kšœ ™ š œ ŸœŸœŸ œŸœ˜*KšœŸœŸœ"Ÿœ ˜WKšœŸœŸœ˜4Kšœ ŸœŸœ&˜AKšœ ˜#KšœŸœ)˜DKšœ Ÿœ˜KšœŸœ˜0K˜K˜—šœŸœŸ œP™pK˜—š œŸœŸœ6Ÿœ ŸœŸœ˜oK˜—šΟnœ˜Kš™K˜—š‘œŸœŸœ˜>Kš™K˜—š ‘œŸœŸœŸœŸœ˜PKš<™K˜K˜——KšŸœ˜K˜K˜K˜—…—b <