webvbt/derived/ResourceBundle.m3


MODULE ResourceBundle;
Generated by m3bundle; see its manpage.

IMPORT Bundle, BundleRep, Text;

TYPE T = Bundle.T OBJECT OVERRIDES
           get      := LookUp;
           getNames := GetNames;
         END;

TYPE Texts = REF ARRAY OF TEXT;

VAR
  bundle: T     := NIL;
  names : Texts := NIL;

PROCEDURE Get(): Bundle.T =
  BEGIN
    IF (bundle = NIL) THEN bundle := NEW (T) END;
    RETURN bundle;
  END Get;

PROCEDURE GetNames (<*UNUSED*> self: T): Texts =
  BEGIN
    IF names = NIL THEN
      names := NEW (Texts, NUMBER (Names));
      names^ := Names;
    END;
    RETURN names;
  END GetNames;

PROCEDURE LookUp (<*UNUSED*> self: T;  element: TEXT): TEXT =
  BEGIN
    FOR i := 0 TO LAST (Names)-1 DO
      IF Text.Equal (Names[i], element) THEN
        RETURN Elements[i];
      END;
    END;
    RETURN NIL;
  END LookUp;

CONST Names = ARRAY [0..8] OF TEXT {
  "errorimage.pbm",
  "contractArrow.pbm",
  "hollowbullet.pbm",
  "emptyimage.pbm",
  "expandOnArrow.pbm",
  "filledbullet.pbm",
  "contractOnArrow.pbm",
  "expandArrow.pbm",
  NIL
};

CONST Elements = ARRAY [0..8] OF TEXT {
  E0,
  E1,
  E2,
  E3,
  E4,
  E5,
  E6,
  E7,
  NIL
};

CONST E0 =
   "P4\r\n16 16\r\n\000\0008\034|>|>|>8\034\000\000\007\340\037\3708\0340\f"
 & "p\016`\006`\006`\006\000\000";

CONST E1 =
   "P4\r\n13 13\r\n\000\000\000\000\377\370\200\010@\020  \020@\010\200\007"
 & "\000\000\000\000\000\000\000\000\000";

CONST E2 =
   "P4\r\n16 16\r\n\000\000\000\000\000\000\000\000\000\000\000\000\036\000"
 & "!\000@\200@\200@\200@\200!\000\036\000\000\000\000\000";

CONST E3 =
   "P4\r\n16 16\r\n\000\0008\034|>|>|>8\034\000\000\000\000`\006`\006`\006p"
 & "\0160\f8\034\037\370\007\340";

CONST E4 =
   "P4\r\n13 13\r\nx\000|\000n\000g\000c\200a\300`\300a\300c\200g\000n\000|"
 & "\000x\000";

CONST E5 =
   "P4\r\n16 16\r\n\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
 & "<\000~\000~\000~\000~\000<\000\000\000\000\000\000\000";

CONST E6 =
   "P4\r\n13 13\r\n\000\000\377\370\377\370\300\030\3408pp8\340\035\300\017"
 & "\200\007\000\000\000\000\000\000\000";

CONST E7 =
   "P4\r\n13 13\r\n0\0008\000<\000>\000?\000?\200?\200?\200?\000>\000<\0008"
 & "\0000\000";

BEGIN
END ResourceBundle.