vorun/derived/VORunBundle.m3


MODULE VORunBundle;
Generated by m3bundle; see its manpage.

IMPORT Bundle, BundleRep, Text;
IMPORT Thread, Wr, TextWr;

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
        IF Elements[i] = NIL THEN Elements[i] := GetElt (i) END;
        RETURN Elements[i];
      END;
    END;
    RETURN NIL;
  END LookUp;

CONST Names = ARRAY [0..5] OF TEXT {
  "templates.obl",
  "vocheckpt.obl",
  "vorestrict.obl",
  "vowidgets.obl",
  "volib.obl",
  NIL
};

VAR Elements := ARRAY [0..5] OF TEXT {
  NIL (* E0 .. E0_3 *),
  NIL (* E1 .. E1_1 *),
  NIL (* E2 .. E2_1 *),
  NIL (* E3 .. E3_5 *),
  NIL (* E4 .. E4_14 *),
  NIL
};

PROCEDURE GetElt (n: INTEGER): TEXT =
  <*FATAL Thread.Alerted, Wr.Failure *>
  VAR wr := TextWr.New ();
  BEGIN
    CASE n OF
    | 0 =>
        Wr.PutText (wr, E0);
        Wr.PutText (wr, E0_0);
        Wr.PutText (wr, E0_1);
        Wr.PutText (wr, E0_2);
        Wr.PutText (wr, E0_3);
    | 1 =>
        Wr.PutText (wr, E1);
        Wr.PutText (wr, E1_0);
        Wr.PutText (wr, E1_1);
    | 2 =>
        Wr.PutText (wr, E2);
        Wr.PutText (wr, E2_0);
        Wr.PutText (wr, E2_1);
    | 3 =>
        Wr.PutText (wr, E3);
        Wr.PutText (wr, E3_0);
        Wr.PutText (wr, E3_1);
        Wr.PutText (wr, E3_2);
        Wr.PutText (wr, E3_3);
        Wr.PutText (wr, E3_4);
        Wr.PutText (wr, E3_5);
    | 4 =>
        Wr.PutText (wr, E4);
        Wr.PutText (wr, E4_0);
        Wr.PutText (wr, E4_1);
        Wr.PutText (wr, E4_2);
        Wr.PutText (wr, E4_3);
        Wr.PutText (wr, E4_4);
        Wr.PutText (wr, E4_5);
        Wr.PutText (wr, E4_6);
        Wr.PutText (wr, E4_7);
        Wr.PutText (wr, E4_8);
        Wr.PutText (wr, E4_9);
        Wr.PutText (wr, E4_10);
        Wr.PutText (wr, E4_11);
        Wr.PutText (wr, E4_12);
        Wr.PutText (wr, E4_13);
        Wr.PutText (wr, E4_14);
    ELSE (*skip*)
    END;
    RETURN TextWr.ToText (wr);
  END GetElt;

CONST E0 =
   "(* Copyright (C) 1995, Digital Equipment Corporation.       *)\n(* All "
 & "rights reserved.                                     *)\n(* See the fil"
 & "e COPYRIGHT for a full description.           *)\n(*                   "
 & "                                       *)\n(* Last modified on Tue Jan "
 & "10 11:50:00 PST 1995 by mhb     *)\n\nmodule templates;\nlet Templates "
 & "= {\nboolean => \"\n(Filter %@filter $FilterState$\n \n  (Shape %@shape"
 & " (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (BgC"
 & "olor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (LabelFont \\\""
 & "$Font$\\\")  \n     \n     (Frame $FrameStyle$  \n      (Rim %@rim (Pen"
 & " $RimPen$) (ShadowSize 1.5)\n       (Border %@border (Pen $BorderPen$)\n"
 & "\n         (Boolean =$initValue$ %@ $fbstyle$ \n                 ( $Boo"
 & "leanContents$ )\n         )\n         \n        )\n           \n       "
 & " )\n      )\n    )\n )\n  \n\n\",\nbrowser => \"\n(Filter %@filter $Fil"
 & "terState$\n \n  (Shape %@shape (Width $XSpan$ + Inf - Inf) (Height $YSp"
 & "an$ + Inf - Inf)\n  \n    (BgColor \\\"$BgColor$\\\") (Color \\\"$FgCol"
 & "or$\\\")\n     (Font \\\"$Font$\\\")  \n     \n     (Frame $FrameStyle$"
 & "  \n      (Rim %@rim (Pen $RimPen$) (ShadowSize 1.5)\n       (Border %@"
 & "border (Pen $BorderPen$)\n      \n        ($typeOfBrowser$   %@        "
 & "                \n            $quick$\n            (Items $Items$)\n   "
 & "         $ValueList$ \n        )\n\n        )\n           \n        )\n"
 & "      )\n    )\n )\n  \n\n\",\nbutton => \"\n(Filter %@filter $FilterSt"
 & "ate$\n \n  (Shape %@shape (Width $XSpan$ + Inf - Inf) (Height $YSpan$ +"
 & " Inf - Inf)\n  \n    (BgColor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\"
 & "\")\n     (LabelFont \\\"$Font$\\\")  \n     \n     (Frame $FrameStyle$"
 & "  \n      (Rim %@rim (Pen $RimPen$) (ShadowSize 1.5)\n       (Border %@"
 & "border (Pen $BorderPen$)\n        $GuardHeader$\n          ($Trill$Butt"
 & "on %@\n          ($ButtonContents$)\n          )\n        $GuardFooter$"
 & "\n        )\n           \n        )\n      )\n    )\n )\n  \n\n\",\ncho"
 & "ice => \"\n(Filter %@filter $FilterState$\n \n  (Shape %@shape (Width $"
 & "XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (BgColor \\\""
 & "$BgC";

CONST E0_0 =
   "olor$\\\") (Color \\\"$FgColor$\\\")\n     (LabelFont \\\"$Font$\\\")  "
 & "\n     \n     (Frame $FrameStyle$  \n      (Rim %@rim (Pen $RimPen$) (S"
 & "hadowSize 1.5)\n       (Border %@border (Pen $BorderPen$)\n\n         ("
 & "Choice =$initValue$ %@ $fbstyle$ \n                 ( $ChoiceContents$ "
 & ")\n         )\n         \n        )\n           \n        )\n      )\n "
 & "   )\n )\n  \n\n\",\nfilebrowser => \"\n(Filter %@filter $FilterState$\n"
 & " \n  (Shape %@shape (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf -"
 & " Inf)\n  \n    (BgColor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n "
 & "    (LabelFont \\\"$LabelFont$\\\")  (Font \\\"$Font$\\\")  \n\n     (F"
 & "rame $FrameStyle$  \n      (Rim %@rim (Pen $RimPen$) (ShadowSize 1.5)\n"
 & "       (Border %@border (Pen $BorderPen$)\n       \n        (VBox\n    "
 & "     (Glue 5)\n          (HBox (Glue 5)\n            (Shape\n          "
 & "    (Width 150 + Inf - 100)\n              (Height 150 + Inf - 100)\n  "
 & "            (VBox\n                (LabelFont \\\"fixed\\\")\n         "
 & "       (DirMenu (For $fbName1$))\n                (Glue 6)\n           "
 & "     (Frame Lowered (BgColor \\\"White\\\")\n                     (File"
 & "Browser %@ $ReadOnly$ \n                         (Value \\\"$Initial$\\"
 & "\")\n                         (Suffixes $Suffixes$)\n                  "
 & "   )\n                 )))\n            (Glue 5)\n            (Shape\n "
 & "             (Width 50 + Inf)\n              (VBox\n                (Fi"
 & "ll)\n                (Button %@action \\\"$ActionLabel$\\\")\n         "
 & "       (Glue 10)\n               ))\n            (Glue 5))\n          ("
 & "Glue 5)\n          (HBox\n            (Glue 5)\n            (Shape (Wid"
 & "th 30 + Inf) (Height 16) \\\"File :\\\")\n            (Frame Lowered (B"
 & "gColor \\\"White\\\") (Helper %@typein (For $fbName2$) (Font \\\"fixed\\"
 & "\")))\n            (Glue 5))\n          (Glue 5))\n        )\n         "
 & "  \n        )\n      )\n    )\n )\n  \n\",\nform => \"\n(ZChild $ZChild"
 & "State$ %@ \n  (Filter %@filter $FilterState$ \n    (Radio %@radio\n    "
 & "  $ZSplitHeader$\n      (Shape %@shape \n        (Width $XSpan$ + $XStr"
 & "etch$ - $XShrink$) \n        (Height $YSpan$ + $YStretch$ - $YShrink$)\n"
 & "     ";

CONST E0_1 =
   "   (BgColor \\\"$BgColor$\\\") \n        (Color \\\"$FgColor$\\\")\n   "
 & "     (LabelFont \\\"$Font$\\\")\n        (Rim %@rim (Pen $RimPen$) \n  "
 & "        (Border %@border (Pen $BorderPen$)\n            (VBox\n\t     ("
 & "Macro $TitleBar$ ()\n              \'(Shape %@title (Height 20)\n      "
 & "          (Frame $FrameStyle$ \n                  (BgColor \\\"$TitleBg"
 & "Color$\\\") \n                  (Color \\\"$TitleFgColor$\\\")\n       "
 & "           (HBox \n                    (Shape (Width 15) \n            "
 & "          (CloseButton (ShadowSize 0) (Pixmap \\\"close.pbm\\\"))) \n  "
 & "                  Chisel\n                    (Shape (Width + 1000)  \n"
 & "                       (ZMove (ShadowSize 0) (Text %@titlestring \\\"$T"
 & "itleString$\\\")))    \n                    Chisel \n                  "
 & "  (Shape (Width 15) \n                      (ZGrow (ShadowSize 0) (Pixm"
 & "ap \\\"grow.pbm\\\"))))))\n\t      )\n\t      $IncludeTitleBar$\t\t\n  "
 & "            $MenuStructure$\n              (Text  %@background \\\"\\\""
 & " )))))\n      $ZSplitFooter$\n)))         \n\",\nframe => \"\n(Filter %"
 & "@filter $FilterState$\n (Radio %@radio\n $ZSplitHeader$\n  (Shape %@sha"
 & "pe (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (B"
 & "gColor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n    \n     (Frame "
 & "$FrameStyle$  \n      (Rim %@rim (Pen $RimPen$) \n       (Border %@bord"
 & "er (Pen $BorderPen$)\n      \n        (Texture  %@ \\\"$TextureFile$\\\""
 & " )\n           \n        )\n      )\n    )\n   )\n $ZSplitFooter$      "
 & "  \n )\n)\n\",\nhscroll => \"\n(Filter %@filter $FilterState$\n \n  (Sh"
 & "ape %@shape (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n "
 & " \n    (BgColor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (Lab"
 & "elFont \\\"$Font$\\\")  \n     \n     (Frame $FrameStyle$  \n      (Rim"
 & " %@rim (Pen $RimPen$) (ShadowSize 1.5)\n       (Border %@border (Pen $B"
 & "orderPen$)\n\n        (Scroller %@\n            (Value $Value$) (Min $M"
 & "in$)\n            (Max $Max$) (Thumb $Thumb$)\n            (Step $Step$"
 & ")\n        )    \n       \n         \n        )\n           \n        )"
 & "\n      )\n    )\n )\n  \n\n\",\nmenu => \"\n(Filter %@Menu\n (Macro \n"
 & "    MenuItem\n    BOA\n";

CONST E0_2 =
   "    (xFilter initState x xLabel xLabelValue)\n    `(Filter %,xFilter ,i"
 & "nitState\n        (Menu %,x (Text %,xLabel ,xLabelValue))\n     )\n  ) "
 & "\n  (Macro \n    PullDownMenuItem\n    BOA\n    (xFilter initState x xL"
 & "abel xLabelValue pulldown)\n    `(Filter %,xFilter ,initState\n        "
 & "(Menu %,x (Text %,xLabel ,xLabelValue)\n            (Border (Pen 1)\n  "
 & "                  ,pulldown\n            )\n        )\n     )\n  ) \n\n"
 & " (Macro\n   MenuButton\n   BOA\n   (xFilter initState x xLabel xLabelVa"
 & "lue )\n   `(Filter %,xFilter ,initState\n       (MButton %,x\n         "
 & "(Text %,xLabel ,xLabelValue) \n       )\n    )\n  )\n    (BgColor \\\"$"
 & "MenuBgColor$\\\") (Color \\\"$MenuFgColor$\\\")\n    (LabelFont \\\"$Me"
 & "nuFont$\\\")\n    (ShadowSize 0)\n    (Border  (Pen 1)\n        (HBox \n"
 & "           $MenuItems$\n           (Glue 1000)\n        )  \n    ) \n)\n"
 & "\",\nnumeric => \"\n(Filter %@filter $FilterState$\n \n  (Shape %@shape"
 & " (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (BgC"
 & "olor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (Font \\\"$Font"
 & "$\\\")  \n     \n     (Frame $FrameStyle$  \n      (Rim %@rim (Pen $Rim"
 & "Pen$) (ShadowSize 1.5)\n       (Border %@border (Pen $BorderPen$)\n\n  "
 & "      (Numeric $HideButtons$ $AllowEmpty$ %@\n            (Value $Value"
 & "$) (Min $Min$)\n            (Max $Max$) \n        )    \n       \n     "
 & "    \n        )\n           \n        )\n      )\n    )\n )\n  \n\n\",\n"
 & "text => \"\n(Filter %@filter $FilterState$\n \n  (Shape %@shape (Width "
 & "$XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (BgColor \\\""
 & "$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (LabelFont \\\"$Font$\\\""
 & ")  \n     \n     (Frame $FrameStyle$  \n      (Rim %@rim (Pen $RimPen$)"
 & " (ShadowSize 1.5)\n       (Border %@border (Pen $BorderPen$)\n\n       "
 & " (Text $Alignment$ %@ \\\"$Initial$\\\")\n         \n        )\n       "
 & "    \n        )\n      )\n    )\n )\n  \n\n\",\ntextedit => \"\n(Filter"
 & " %@filter $FilterState$\n \n  (Shape %@shape (Width $XSpan$ + Inf - Inf"
 & ") (Height $YSpan$ + Inf - Inf)\n  \n    (BgColor \\\"$BgColor$\\\") (Co"
 & "lor \\\"$FgColor$\\\")\n     (Font \\\"$Font$\\\")  \n     \n     (Fram"
 & "e $FrameStyle$  \n   ";

CONST E0_3 =
   "   (Rim %@rim (Pen $RimPen$) (ShadowSize 1.5)\n       (Border %@border "
 & "(Pen $BorderPen$)\n\n        (TextEdit %@ $ReadOnly$ $Clip$ $NoScrollba"
 & "r$\n            ($Initial$)\n         )\n         \n        )\n        "
 & "   \n        )\n      )\n    )\n )\n  \n\n\",\ntypein => \"\n(Filter %@"
 & "filter $FilterState$\n \n  (Shape %@shape (Width $XSpan$ + Inf - Inf) ("
 & "Height $YSpan$ + Inf - Inf)\n  \n    (BgColor \\\"$BgColor$\\\") (Color"
 & " \\\"$FgColor$\\\")\n     (Font \\\"$Font$\\\")  \n     \n     (Frame $"
 & "FrameStyle$  \n      (Rim %@rim (Pen $RimPen$) (ShadowSize 1.5)\n      "
 & " (Border %@border (Pen $BorderPen$)\n\n        (TypeIn %@ $ReadOnly$ $E"
 & "xpandOnDemand$\n            (Value \\\"$Initial$\\\")\n         )\n    "
 & "     \n        )\n           \n        )\n      )\n    )\n )\n  \n\n\","
 & "\nvideo => \"\n(Filter %@filter $FilterState$\n \n  (Shape %@shape (Wid"
 & "th $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n    (BgColor "
 & "\\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (Font \\\"$Font$\\\""
 & ")  \n     \n     (Frame $FrameStyle$  \n      (Rim %@rim (Pen $RimPen$)"
 & " (ShadowSize 1.5)\n       (Border %@border (Pen $BorderPen$)\n     (TSp"
 & "lit %@toggle   =$PlayVideo$\n        (Audio %@audio =\\\"$AudioSource$\\"
 & "\" (Volume $Volume$)\n\t\t$Mute$ $IgnoreMapping$\n            (Video %@"
 & " \n\t\t(Quality $Quality$)\n\t\t(Width $Width$) (Height $Height$)\n\t\t"
 & "(Colors $Colours$) (MSecs $MSecs$)\n\t\t$Synchronous$ $FixedSize$ $Paus"
 & "ed$\n\t\t\\\"$VideoSource$\\\"\n\t\t)\n         )\n\t(Text \\\"\\\")\n "
 & "     )\n         \n        )\n           \n        )\n      )\n    )\n "
 & ")\n  \n\n\",\nvscroll => \"\n(Filter %@filter $FilterState$\n \n  (Shap"
 & "e %@shape (Width $XSpan$ + Inf - Inf) (Height $YSpan$ + Inf - Inf)\n  \n"
 & "    (BgColor \\\"$BgColor$\\\") (Color \\\"$FgColor$\\\")\n     (LabelF"
 & "ont \\\"$Font$\\\")  \n     \n     (Frame $FrameStyle$  \n      (Rim %@"
 & "rim (Pen $RimPen$) (ShadowSize 1.5)\n       (Border %@border (Pen $Bord"
 & "erPen$)\n\n        (Scroller Vertical %@ \n            (Value $Value$) "
 & "(Min $Min$)\n            (Max $Max$) (Thumb $Thumb$)\n            (Step"
 & " $Step$)\n        )    \n       \n         \n        )\n           \n  "
 & "      )\n      )\n    )\n )\n  \n\n\",\n};\n";

CONST E1 =
   "(* Copyright (C) 1995, Digital Equipment Corporation.       *)\n(* All "
 & "rights reserved.                                     *)\n(* See the fil"
 & "e COPYRIGHT for a full description.           *)\n(*                   "
 & "                                       *)\n(* Last modified on Tue Jan "
 & "10 11:50:06 PST 1995 by mhb     *)\n\nmodule vocheckpt;\n(* used by mod"
 & "ule \"volib\" *)\nsys_pushSilence();\n\n(* Stuff to checkpoint\n\n\t== "
 & "all other attributes are set by method calls ==\n\n\tboolean ::=  initi"
 & "alValue := b.getValue();\n\tbrowser ::= Selections/Selection\n\tchoice "
 & "::=  initialValue := c.getValue();\n\tfilebrowser ::=  Value := fb.getF"
 & "ilename();\n\tform => (checkpoint open/close state of anchored forms)\n"
 & "\thscroll ::= Val := h.getValue();\n\tnumeric ::= Val := n.getValue();\n"
 & "\ttextedit ::=  teContents :=  text_encode(t.getText());\n\ttypein  ::="
 & "  tyInit := text_encode(t.getText());\n\tvscroll  ::=  Val := v.getValu"
 & "e();\n\t\n*)\n(* generic routine - forward declaration *)\nvar checkptS"
 & "X = 0;\nlet childOffRed = 20;\n\nlet genericCP = proc(nv)\n\tlet width "
 & "= form_getInt(nv.form, nv.name & \"filter\", \"EastEdge\") -\n\t\t\t   "
 & " form_getInt(nv.form, nv.name & \"filter\", \"WestEdge\");\n\tlet heigh"
 & "t = form_getInt(nv.form, nv.name & \"filter\", \"SouthEdge\") -\n\t\t\t"
 & "    form_getInt(nv.form, nv.name & \"filter\", \"NorthEdge\");\n\n\tif "
 & "(width isnot 0) and (height isnot 0) then\n\t(* true when the widget is"
 & " mapped *)\n\t\tnv.height := height; nv.width := width;\n\t\tif nv.clas"
 & "s is \"form\" then nv.InitialState := \"Active\"; end;\n\t\tlet p = nv."
 & "parent;\n\t\tif p isnot 0 then\n\t\t\tnv.x := form_getInt(nv.form, nv.n"
 & "ame & \"filter\", \"WestEdge\") -\n\t\t\t\t     form_getInt(p.form, p.n"
 & "ame & \"filter\", \"WestEdge\");\n\t\t\tnv.y := form_getInt(nv.form, nv"
 & ".name & \"filter\", \"NorthEdge\") -\n\t\t\t\t     form_getInt(p.form, "
 & "p.name & \"filter\", \"NorthEdge\");\n\t\t\tif p.class is \"form\" then"
 & "\n\t\t\t\tif p.ParentForm is 0 then\n\t\t\t\t\tnv.y := nv.y + childOffR"
 & "ed;\n\t\t\t\tend;\n\t\t\tend;\n\t\telse\t\n\t\t\tnv.x := form_getInt(nv"
 & ".form, nv.name & \"filter\", \"WestEdge\");\n\t\t\tnv.y := form_getInt("
 & "nv.form, nv.name & \"filter\", \"NorthEdg";

CONST E1_0 =
   "e\");\n\t\tend;\n\telsif nv.class is \"form\" then\n\t\tnv.InitialState"
 & " := \"Vanish\";\n\t\t(* otherwise this widget may be unmapped because a"
 & " parent is unmapped *)\n\tend;\nend;\n\nlet splitCP = proc(nv)\n\tgener"
 & "icCP(nv);\n\tforeach child in nv.children do\n\t\tcheckptSX(child);\t\t"
 & "\n\tend;\n\nend;\n\nlet formCP = proc(nv)\n\n\n\tlet oldwidth = nv.widt"
 & "h;\n\tlet oldheight = nv.height;\n\n\tsplitCP(nv); (* will also do gene"
 & "ric *)\n\n\n\tlet incwidth = nv.width - oldwidth;\n\tlet incheight = nv"
 & ".height - oldheight;\n\t\n\tnv.ShrinkX := nv.ShrinkX + incwidth;\n\tnv."
 & "StretchX := nv.StretchX - incwidth;\n\tnv.ShrinkY := nv.ShrinkY + inche"
 & "ight;\n\tnv.StretchY := nv.StretchY - incheight;\n\n\tif nv.ShrinkX < 0"
 & " then nv.ShrinkX := 0 end;\n\tif nv.ShrinkY < 0 then nv.ShrinkY := 0 en"
 & "d;\n\tif nv.StretchX < 0 then nv.StretchX := 0 end;\n\tif nv.StretchY <"
 & " 0 then nv.StretchY := 0 end;\n\t\n\n\tforeach child in nv.ChildForms d"
 & "o\n\t\tcheckptSX(child);\t\t\n\tend;\n\t(* if this is an anchored form "
 & "... *)\n\tlet pf = nv.ParentForm;\n\tif pf isnot 0 then\n\t\tnv.x := fo"
 & "rm_getInt(nv.form, nv.name & \"filter\", \"WestEdge\") -\n\t\t\t     fo"
 & "rm_getInt(pf.form, pf.name & \"filter\", \"WestEdge\");\n\t\tnv.y := fo"
 & "rm_getInt(nv.form, nv.name & \"filter\", \"NorthEdge\") -\n\t\t\t     f"
 & "orm_getInt(pf.form, pf.name & \"filter\", \"NorthEdge\");\t\t\n\telse\n"
 & "\t\t(* Need to compensate for absence of title in top level form.\n\t\t"
 & "    The s-expression is computed after reducing the given height\n\t\t "
 & "   by childOffRed, so when we are computing the height from the\n\t\t  "
 & "   vbt we need to add this amount  *)\n\t\n\t\tnv.height := nv.height +"
 & " childOffRed;\n        end;\n\tnv.CheckpointedXY := true;\nend;\n\n(* p"
 & "rocedure dispatching kludge *)\ncheckptSX := proc(wid)\n\tvar dogeneric"
 & " = true;\n\tif wid.class is \"form\" then\n\t\tformCP(wid);\n\t\tdogene"
 & "ric := false;\n    \telsif wid.class is \"frame\" then\n\t\tsplitCP(wid"
 & ");\n\t\tdogeneric := false;\n\telsif wid.class is \"boolean\"  then\n\t"
 & "\twid.initialValue := wid.getValue();\n\telsif wid.class is \"browser\""
 & " then\n\t\t\t(* getSelection automatically does the checkpointing! *)\n"
 & "\t\t\twid.getSelection();\n\t\t\tok\n\telsif wid.class is \"choi";

CONST E1_1 =
   "ce\" then\n\t\twid.initialValue := wid.getValue();\n\telsif wid.class i"
 & "s  \"filebrowser\" then \n\t\twid.Value := text_encode(wid.getFilename("
 & "));\n\telsif wid.class is \"hscroll\" then\n\t\t wid.Val := wid.getValu"
 & "e();\n\telsif wid.class is \"numeric\" then\n\t\twid.Val := wid.getValu"
 & "e();\n\telsif wid.class is \"textedit\" then\n\t\twid.teContents :=  te"
 & "xt_encode(wid.getText());\n\telsif wid.class is \"typein\" then\n\t\twi"
 & "d.tyInit := text_encode(wid.getText());\n\telsif wid.class is \"vscroll"
 & "\" then  \n\t\twid.Val := wid.getValue();\n\tend;\n\tif dogeneric then\n"
 & "\t\tgenericCP(wid);\n\tend;\n\tok;\t\nend;\n\n\nlet rebuildWidget = pro"
 & "c(wid)\n\t(* not applicable to forms *)\n\t(* assume already checkpoint"
 & "ed *)\n\tlet f = wid.form;\n\tlet widpar = wid.parent;\n\n\tvar offsetR"
 & "ed = 0;\n\tif widpar.class is \"form\" then\n\t\tif widpar.ParentForm i"
 & "s 0 then\n\t\t\toffsetRed := 20;\n\t\tend\n\tend;\n\tlet name = wid.nam"
 & "e & \"top\";\n\tlet zname = widpar.name & \"zsplit\";\n\tlet lev = form"
 & "_childIndex(f, zname, name);\n\n        let nsx = computeSX(wid); (* th"
 & "is mutates the name *)\n\tvar visibility = \"\";\n\t\tif wid.InitialSta"
 & "te isnot \"Vanish\" then\n\t\t\tvisibility := \"Open\";\n\t\tend;\n\tle"
 & "t newsx =  \"(ZChild %\" & wid.name & \"top (At \" & fmt_int(wid.x) & \""
 & "  \"\n                      & fmt_int(wid.y - offsetRed) & \"  NW Absol"
 & "ute)  \" & visibility & \"\\n \" &\n                      ResizeString("
 & "wid) & nsx & \")\";\n\n\tform_delete(f, \tzname, name);\n\tform_insert("
 & "f, zname, newsx, lev);\n\twid.SELF.VOAttachCBacks(); (* all callbacks *"
 & ")\nend;\n\nlet refreshWidget = proc(wid) \n\tcheckptSX(wid);\n\trebuild"
 & "Widget(wid);\nend;\n\nsys_popSilence();\n";

CONST E2 =
   "(* Copyright (C) 1995, Digital Equipment Corporation.       *)\n(* All "
 & "rights reserved.                                     *)\n(* See the fil"
 & "e COPYRIGHT for a full description.           *)\n(*                   "
 & "                                       *)\n(* Last modified on Tue Jan "
 & "10 11:50:14 PST 1995 by mhb     *)\n\nmodule vorestrict;\n\nsys_pushSil"
 & "ence();\n\nvar isAllowed = 0;\nvar isBlocked = 0;\n\n(\nvar allowList ="
 & " [];\nvar blockList = [];\nlet nullstring = proc(t)\n\tlet len = text_l"
 & "ength(t);\n\tvar null = true;\n\tfor i = 0 to len-1 do\n\t\tlet c = tex"
 & "t_char(t, i);\n\t\tnull := null and (c is \' \')\n\t\t\t\tor (c is \'\\"
 & "t\');\n\tend;\n\tnull;\nend;\n\n(* test if a is a postfix of b *)\nlet "
 & "postfix = proc(a,b) \n\tlet alen = text_length(a);\n\tlet blen = text_l"
 & "ength(b);\n\tif (alen > blen) then\n\t\tfalse;\n\telse\n\t\ta is text_s"
 & "ub(b, blen-alen, alen);\t\t\t\n\tend;\nend;\n\n(* test if a is a prefix"
 & " of b *)\nlet prefix = proc(a,b)\n\tlet alen = text_length(a);\n\tlet b"
 & "len = text_length(b);\n\tif (alen > blen) then\n\t\tfalse;\n\telse\n\t\t"
 & "a is text_sub(b, 0, alen);\t\t\t\n\tend;\n end;\n\nlet equal = proc(a,b"
 & ") a is b end;\n\ntry \nlet txt = volibLocal.LoadFile(sys_getEnvVar(\"HO"
 & "ME\")\n\t& \"/.vorestrict\");\nlet list = text_explode(\"\\n\", txt);\n"
 & "var curmode = \"\";\n\nforeach line in list do\n\tif not (nullstring(li"
 & "ne)) then\n\t\tlet teline = text_explode(\" \\t\", line);\n\t\tif text_"
 & "char(teline[0], 0) is \'#\' then\n\t\t   ok; (* comment ignore *)\n\t\t"
 & "elsif \n\t\t     text_char(teline[0], 0) is \'@\' then\t\n\t\t\tcurmode"
 & " := teline[0];\n\t\telse\n\t\t\tvar thislist = [];\n\t\t\tvar flexible "
 & "= false;\n\t\t\tforeach word in text_explode(\" \\t\", line) do\n\t\t\t"
 & "\tif word is \"...\" then flexible := true;\n\t\t\t\telsif text_char(wo"
 & "rd, text_length(word)-1)\n\t\t\t\t\tis \'*\' then\n\t\t\t\tthislist := "
 & "thislist @ \n\t\t\t\t[{pattern =>  text_sub(word, 0,\n\t\t\t\t\t\ttext_"
 & "length(word) -1),\n\t\t\t\t  check => \"isPrefix?\"}];\n\t\t\t\t   \n\t"
 & "\t\t\telsif text_char(word,0) is \'*\' then\n\t\t\t\tthislist := thisli"
 & "st @\n                                [{pattern =>  text_sub(word, 1,\n"
 & "                                                text_length(word) -1),\n"
 & "                 ";

CONST E2_0 =
   "                 check => \"isPostfix?\"}];\n\t\t\t\telse\n\t\t\t\tthis"
 & "list := thislist @\n\t\t\t\t[{pattern => word, check => \"isEqual?\"}]\n"
 & "\t\t\t\tend;\n\t\t\tend;\n\t\t\tif curmode is \"@allow\" then\n\t\t\t\t"
 & "allowList := allowList @ \n\t\t\t\t[{FlexibleArity => flexible,\n\t\t\t"
 & "           Words => thislist } ];\n\t\t\telsif curmode is \"@block\" th"
 & "en\n\t\t\t\tblockList := blockList @ \n\t\t\t\t[{FlexibleArity => flexi"
 & "ble,\n\t\t\t\t   Words => thislist}];\n\t\t\tend;\n\t\tend;\n\tend;\nen"
 & "d;\nexcept\nelse\nend; \n\nlet matches = proc(datum, cmd)\n\tif  \n\t  "
 & "    (cmd.FlexibleArity  and  (#(datum) >= #(cmd.Words)))\n\t\tor \n\t  "
 & "    (#(datum) is #(cmd.Words))\n       then\n\t\t  var matches = true;\n"
 & "\t\t  for i = 0 to #(cmd.Words)-1 do\n\t\t     let chk = cmd.Words[i].c"
 & "heck;\n\t\t     if chk is \"isEqual?\" then \n\t\t\tmatches := matches "
 & "and equal(datum[i], cmd.Words[i].pattern);\n\t\t     elsif chk is \"isP"
 & "refix?\" then \n\t\t\tmatches := matches and prefix(cmd.Words[i].patter"
 & "n, datum[i]);\n\t\t     else\n\t\t \tmatches := matches and postfix(cmd"
 & ".Words[i].pattern, datum[i]);\n\t\t     end;\n\t\t  end;  \t   \n \t\tm"
 & "atches;\n\telse\n\t \tfalse;\n\tend;\nend;\n\nisAllowed := proc(cmd)\n\t"
 & "var allowed = false;\n\tforeach i in allowList do\n\t\tallowed := allow"
 & "ed or matches(cmd, i);\n\tend;\n\tallowed;\nend;\n\nisBlocked := proc(c"
 & "md)\n\tvar blocked = false;\n\tforeach i in blockList do\n\t\tblocked :"
 & "= blocked or matches(cmd, i);\n\tend;\n\tblocked;\nend;\n\n);\n\n\nlet "
 & "prcs = process_new(processor, [\"voquery\"], false);\n\nlet inpipe = pr"
 & "ocess_out(prcs);\nlet outpipe = process_in(prcs);\n\nlet askUser = proc"
 & "(mesg)\n\twr_putText(outpipe, mesg & \"\\n\");\n\twr_flush(outpipe);\n\t"
 & "rd_getChar(inpipe) is \'y\';\nend;\n\n\nlet protViolation  = exception("
 & "\"Protection Violation\");\n\n(* Redefine the restriction procs *)\npro"
 & "cessNew := proc(nameAndArgs, mergeOut) \n\tlet cmdlist = [\"processNew\""
 & "] @ nameAndArgs;\n\tif isAllowed(cmdlist) then\n\t\tprocess_new(process"
 & "or, nameAndArgs, mergeOut);\n\telsif not (isBlocked(cmdlist)) then\n\t\t"
 & "let msg = \"Start Process : \" & text_implode(\' \', nameAndArgs) & \" "
 & "?\";\n\t\tif askUser(msg) then\n\t\t\tprocess_new(processor, nameAndArg"
 & "s, mergeOut)\n\t\telse\n\t\t\t ra";

CONST E2_1 =
   "ise(protViolation)\n\t\tend;\n\telse\n\t\traise(protViolation)\t\n\tend"
 & ";\nend;\n \n\nrdOpen := proc(fnm) \n\tlet cmdlist = [\"rdOpen\",  fnm];"
 & "\n\tif isAllowed(cmdlist) then\n\t\t\trd_open(fileSys, fnm);\n\telsif n"
 & "ot (isBlocked(cmdlist)) then\n\t\tlet msg = \"Read File: \" & fnm & \" "
 & "?\";\n\t\tif askUser(msg) then\n\t\t\trd_open(fileSys, fnm);\n\t\telse\n"
 & "\t\t\t raise(protViolation)\n\t\tend;\n\telse\n\t\traise(protViolation)"
 & ";\n\tend;\nend;\n \nwrOpen := proc(fnm) \n\tlet cmdlist = [\"wdOpen\", "
 & " fnm];\n\tif isAllowed(cmdlist) then\n\t\t\twr_open(fileSys, fnm);\n\te"
 & "lsif not (isBlocked(cmdlist)) then\n\t\tlet msg = \"Write File: \" & fn"
 & "m & \" ?\";\n\t\tif askUser(msg) then\n\t\t\twr_open(fileSys, fnm);\n\t"
 & "\telse\n\t\t\t raise(protViolation)\n\t\tend;\n\telse\n\t\traise(protVi"
 & "olation);\n\tend;\nend;\n\nwrOpenAppend := proc(fnm) \n\tlet cmdlist = "
 & "[\"wrOpenAppend\",  fnm];\n\tif isAllowed(cmdlist) then\n\t\t\twr_openA"
 & "ppend(fileSys, fnm);\n\telsif not (isBlocked(cmdlist)) then\n\t\tlet ms"
 & "g = \"Append to File: \" & fnm & \" ?\";\n\t\tif askUser(msg) then\n\t\t"
 & "\twr_openAppend(fileSys, fnm);\n\t\telse\n\t\t\t raise(protViolation)\n"
 & "\t\tend;\n\telse\n\t\traise(protViolation);\n\tend;\nend;\n\nvolibLocal"
 & ".processNew := meth(s, n , mer)\n\tprocessNew(n, mer)\nend;\n\nvolibLoc"
 & "al.rdOpen := meth(s, fnm)\n\trdOpen(fnm)\nend;\n\nvolibLocal.wrOpen := "
 & "meth(s, fnm)\n\twrOpen(fnm)\nend;\n\nvolibLocal.wrOpenAppend := meth(s,"
 & " fnm)\n\twrOpenAppend(fnm)\nend;\n\n(* After this if  processor, fileSy"
 & "s and fileSysReader\n    are hidden these three procedures are the only"
 & "\n    means of accessing the processor/filesystem *)\n\nsys_popSilence("
 & ");\n";

CONST E3 =
   "(* Copyright (C) 1995, Digital Equipment Corporation.       *)\n(* All "
 & "rights reserved.                                     *)\n(* See the fil"
 & "e COPYRIGHT for a full description.           *)\n(*                   "
 & "                                       *)\n(* Last modified on Tue Jan "
 & "10 11:50:26 PST 1995 by mhb     *)\n\nmodule vowidgets;\n(* used by mod"
 & "ule \"volib\" *)\n(* requires module \"templates\" *)\n\nsys_pushSilenc"
 & "e();\n\n(* generic routine - forward declaration *)\nvar computeSX = 0;"
 & "\n\n(* find and replace *)\nlet rep = proc(sx , pattern, newval)\n\ttex"
 & "t_replaceAll(\"$\" & pattern & \"$\", newval, sx);\nend;\n\nlet replist"
 & " = proc(s, plist)\n\tvar sx = s;\n\tforeach tuple in plist do\n\t\tsx :"
 & "= rep(sx, tuple[0], tuple[1]); \n\tend;\n\tsx;\nend;\n\nlet ResizeStrin"
 & "g = proc(ch) \n\tlet model = ch.ResizeModel;\n\tif text_equal(model, \""
 & "CenterPin\") then\n\t\"FixedHV\";\n\telsif text_equal(model, \"HScaled\""
 & ") then\n\t\"FixedV\";\n\telsif text_equal(model, \"VScaled\") then\n\t\""
 & "FixedH\";\n\telse \"Scaled\";\n\tend;\nend;\n\nlet mutateName = proc(wi"
 & "d)\n\tlet ix = text_findLast(\"vq\", wid.name, 1000);\n\tif ix is -1 th"
 & "en\n\t\twid.name := wid.name & \"vq0\";\n\telse\t\n\t\tlet num = text_s"
 & "ub(wid.name, ix+2, text_length(wid.name)-ix+2);\n\t\tlet no = text_toIn"
 & "t(num) + 1;\n\t\twid.name :=  text_sub(wid.name, 0, ix+2) &  fmt_int(no"
 & "); \n\tend;\nend;\n\nlet genericSX = proc(v, s)\n\tvar sx =  replist(s,"
 & "[ [\"XSpan\", fmt_int(v.width)],\n\t\t\t\t  \t [\"YSpan\", fmt_int(v.he"
 & "ight)],\n\t\t\t\t\t [\"RimPen\", fmt_int(v.Rim)],\n\t\t\t\t\t [\"Border"
 & "Pen\", fmt_int(v.Border)],\n\t\t\t\t\t [\"BgColor\", v.BgColor],\n\t\t\t"
 & "\t\t [\"FgColor\", v.FgColor],\n\t\t\t\t\t [\"Font\", v.Font],\n\t\t\t\t"
 & "\t [\"FilterState\", v.InitialState],\n\t\t\t\t\t]);\t\n\tif text_equal"
 & "(v.Embellishment, \"None\") then\n\t\tsx := rep(sx, \"FrameStyle\", \"("
 & "ShadowSize 0)\");\n\telse\n\t\tsx := rep(sx, \"FrameStyle\", v.Embellis"
 & "hment);\n\tend;\n\tsx := \ttext_replaceAll(\"%@\", \"%\" & v.name, sx);"
 & "\n\tsx;\nend;\n\nlet splitSX = proc(nv, s)\n\tvar sx = s;\n\tvar footer"
 & " = \")\\n\";\n\tvar includeTitleBar = true;\n\tvar childOffRed = 0;\n\n"
 & "\tsx := rep(sx, \"ZSplitHeader\", \"(ZSplit %@zsplit\\n (ZBackground %@"
 & "zback\\n\");\n\tif tex";

CONST E3_0 =
   "t_equal(nv.class, \"form\") then\n\t\tif nv.ParentForm is 0 then \n\t\t"
 & "\tchildOffRed := 20;\n\t\t\tsx := rep(sx, \"YSpan\", fmt_int(nv.height-"
 & "childOffRed));\n\t\t\tincludeTitleBar := false;\n\t\tend\n\tend;\t\t\n\t"
 & "foreach child in nv.children do\n\t\tlet csx = computeSX(child);\n\t\tv"
 & "ar visibility = \"\";\n\t\tif child.InitialState isnot \"Vanish\" then\n"
 & "\t\t\tvisibility := \"Open\";\n\t\tend;\n\t\tfooter := footer & \"(ZChi"
 & "ld %\" & child.name & \"top (At \" & fmt_int(child.x) & \"  \"\n       "
 & "               & fmt_int(child.y - childOffRed) & \"  NW Absolute) \" &"
 & " visibility & \"\\n \" &\n                      ResizeString(child) &\n"
 & "                      csx & \"\\n    )\\n\";\n\tend;\n\tif text_equal(n"
 & "v.class, \"form\") then\n\t\tforeach ch in nv.ChildForms do\n\t\t\tfoot"
 & "er := footer & computeSX(ch);\n\t\tend\n\tend;\n\tfooter := footer & \""
 & ")\\n\";\n\tsx := rep(sx, \"ZSplitFooter\", footer);\n\tsx := rep(sx, \""
 & "TextureFile\", nv.Texture);\n\tif text_equal(nv.class, \"form\") then\n"
 & "\t\tif includeTitleBar then \n\t\t\tsx := rep(sx, \"IncludeTitleBar\", "
 & "\"($TitleBar$)\");\n\t\telse\n\t\t\tsx := rep(sx, \"IncludeTitleBar\", "
 & "\"\");\n\t\tend;\n\t\tsx := rep(sx, \"TitleBar\", nv.name & \"TitleBar\""
 & ");\n\tend;\n\tgenericSX(nv, sx);\nend;\n\nlet menuSX = proc(nv)\n\t(* a"
 & "ssert: nv is a formnode with a menu *)\n\tvar sx = Templates.menu;\n\ts"
 & "x := replist(sx, [[\"MenuBgColor\", nv.MenuBgColor],\n\t\t\t\t\t    [\""
 & "MenuFgColor\", nv.MenuFgColor],\n\t\t\t\t\t     [\"MenuFont\", nv.MenuF"
 & "ont]]);\n\tvar menuDef = \"\";\n\tlet first = 0;\n\tlet last = #(nv.Men"
 & "u)-1;\n\tvar i = first;\n\tloop\n\t\tif  i > last then exit; end;\n\t\t"
 & "let m = nv.Menu[i];\n\t\tmutateName(m);\n\t\tif (m.Level is 0) and not "
 & "(text_equal(m.name, \"RIDGE\")) then\n\t\t\tvar ctr = 0;\n\t\t\tvar ix "
 & "= i+1;\n\t\t\tvar pulldownDef = \"(VBox \\n\"; (* start creation of pul"
 & "ldown *)\n\t\t\tif ix <= last then\n\t\t\t  \tloop\n\t\t\t\t\tlet mx = "
 & "nv.Menu[ix];\n\t\t\t\t\tif (ix > last) or (mx.Level is 0) then exit; en"
 & "d;\n\t\t\t\t\tif mx.Level is 1 then\n\t\t\t\t\t\tif text_equal(mx.name,"
 & " \"RIDGE\") then\n\t\t\t\t\t\t \tpulldownDef := pulldownDef & \"Ridge\\"
 & "n\";\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\tpulldownDef :=\n              \t\t"
 & "\t\t\t      pulldownDef & \"(MenuButton \" & mx.name\n                \t"
 & "\t\t\t\t ";

CONST E3_1 =
   "     & \"Filter \" & mx.initialState & \" \"\n                 \t\t\t\t"
 & "\t      & mx.name & \" \" & mx.name & \"Label \"\n                     "
 & "\t\t\t\t\t      & \"\\\"\" & mx.Label & \"\\\")\\n\"\n                \t"
 & "\t\t\tend;\t\n\t\t\t\t\t        ctr := ctr + 1;\n\t\t\t\t\tend;\n\t\t\t"
 & "\t\tix := ix +1;\n\t\t\t\tend;\n\t\t\t\tpulldownDef := pulldownDef & \""
 & ")\\n\"; (* close VBox *)\n\t\t\tend; (* if ix <= last  *)\n\t\t        "
 & "if ctr > 0 then \n\t\t\t\t menuDef :=\n         \t\t\t     menuDef & \""
 & "(PullDownMenuItem \" & m.name & \"Filter \"\n           \t\t\t     & m."
 & "initialState & \" \" & m.name & \" \"\n             \t\t\t     & m.name"
 & " & \"Label \" & \"\\\"\" & m.Label & \"\\\"\\n\"\n              \t\t\t "
 & "    & pulldownDef & \")\\n\";\n\t\t\telse\n\t\t\t\tmenuDef :=\n     \t\t"
 & "\t\t         menuDef & \"(MenuItem \" & m.name & \"Filter \"\n         "
 & "     \t\t\t\t  & m.initialState & \" \" & m.name & \" \"\n             "
 & "  \t\t\t\t  & m.name & \"Label \" & \"\\\"\" & m.Label & \"\\\")\\n\";\n"
 & "\t\t\tend;\n\t\t\ti := ix -1;\n\t\tend;\n\t\ti := i +1;\n\tend;\t\n\tre"
 & "p(sx, \"MenuItems\", menuDef);\nend;\n\n\nlet booleanSX = proc(nv)\n\tv"
 & "ar sx = Templates.boolean;\n\tsx := rep(sx, \"fbstyle\", nv.feedbackSty"
 & "le);\n\tif nv.initialValue then\n\t\tsx :=rep(sx, \"initValue\", \"TRUE"
 & "\");\n\telse\n\t\tsx:=rep(sx, \"initValue\", \"FALSE\");\t\n\tend;\n\ti"
 & "f nv.textLabel then\n\t\tsx:=rep(sx, \"BooleanContents\", \"Text %@text"
 & " \\\"\" & nv.textString & \"\\\"\");\n\telse\n\t\tsx:=rep(sx, \"Boolean"
 & "Contents\",\"Pixmap %@pixmap \\\"\" & nv.pixmap & \"\\\"\");\n\tend;\t\n"
 & "\tgenericSX(nv, sx);\nend;\n\nlet browserSX = proc(nv)\n\tvar sx = Temp"
 & "lates.browser;\n\tif nv.Multiplicity then\n\t\tsx:=rep(sx, \"typeOfBrow"
 & "ser\", \"MultiBrowser\");\n\t\tif #(nv.Selections) is 0 then\n\t\t\tsx:"
 & "=rep(sx, \"ValueList\", \"\");\n\t\telse\n\t\t\tvar values = \"\";\n\t\t"
 & "\tforeach i in nv.Selections do\n\t\t\t\t values := values & fmt_int(i)"
 & " & \" \";\n\t\t\tend;\n\t\t\tsx := rep(sx, \"ValueList\", \"(Value \" &"
 & " values  & \" )\" );\n\t\tend;\n\telse\n\t\tsx:=rep(sx, \"typeOfBrowser"
 & "\", \"Browser\");\t\n\t\tif nv.Selection is -1 then\n\t\t\tsx := rep(sx"
 & ", \"ValueList\", \"\");\n\t\telse\n\t\t\tsx := rep(sx, \"ValueList\",  "
 & "\"(Value \" & fmt_int(nv.Selection) & \" )\" );\n\t\tend;\n\tend;\n\tif"
 & " nv.Quick then\n\t\tsx := rep(sx, \"quick\", \"Quick\");\n\telse\n\t\ts"
 & "x := rep(sx, ";

CONST E3_2 =
   "\"quick\", \"\");\n\tend;\n\n\tif #(nv.Contents) is 0 then\n\t\t\tsx:=r"
 & "ep(sx, \"Items\", \"\");\n\t\telse\n\t\t\tvar items = \"\";\n\t\t\tfore"
 & "ach item in nv.Contents do\n\t\t\t\t items := items & \"\\\"\" & item &"
 & "  \"\\\" \";\n\t\t\tend;\n\t\t\tsx := rep(sx, \"Items\", items );\n\t\t"
 & "end;\n\tgenericSX(nv, sx);\nend;\n\nlet buttonSX = proc(nv)\n\tvar sx ="
 & " Templates.button;\n\tif nv.Guard then\n\t\tsx := replist(sx, [[\"Guard"
 & "Header\", \"(Guard %@guard \"],\n\t\t\t\t\t    [\"GuardFooter\", \")\"]"
 & "]);\n\telse\n\t\tsx := replist(sx, [[\"GuardHeader\", \"\"],\n\t\t\t\t\t"
 & "    [\"GuardFooter\", \"\"]]);\t\n\tend;\n\tif nv.Trill then\n\t\tsx :="
 & " rep(sx, \"Trill\", \"\");\n\telse\n\t\tsx := rep(sx, \"Trill\", \"\");"
 & "\n\tend;\t\t\t\n\tif nv.textLabel then\n\t\tsx := rep(sx, \"ButtonConte"
 & "nts\",\"Text %@text \\\"\" & nv.textString & \"\\\"\" );\n\telse\n\t\ts"
 & "x := rep(sx, \"ButtonContents\",\n\t\t\t\t\t       \"Pixmap Accurate %@"
 & "pixmap \\\"\" & nv.pixmap & \"\\\"\");\n\tend;\t\n\tgenericSX(nv, sx);\t"
 & "\t\nend;\n\nlet choiceSX = proc(nv)\n\tvar sx = Templates.choice;\n\tsx"
 & ":=rep(sx, \"fbstyle\", nv.feedbackStyle);\n\tif nv.initialValue then\n\t"
 & "\tsx:=rep(sx, \"initValue\", \"TRUE\");\n\telse\n\t\tsx:=rep(sx, \"init"
 & "Value\", \"FALSE\");\t\n\tend;\n\tif nv.textLabel then\n\t\tsx:=rep(sx,"
 & " \"ChoiceContents\", \"Text %@text \\\"\" & nv.textString & \"\\\"\");\n"
 & "\telse\n\t\tsx:=rep(sx, \"ChoiceContents\",\"Pixmap %@pixmap \\\"\" & n"
 & "v.pixmap & \"\\\"\");\n\tend;\t\n\tgenericSX(nv, sx);\t\nend;\n\nlet fi"
 & "lebrowserSX = proc(nv)\n\tvar sx = Templates.filebrowser;\n\tif nv.Read"
 & "Only then\n\t\tsx := rep(sx, \"ReadOnly\", \"ReadOnly\");\n\telse\n\t\t"
 & "sx :=  rep(sx, \"ReadOnly\", \"\");\n\tend;\n\tsx := replist(sx, [[\"La"
 & "belFont\", nv.LabelFont],\n\t\t\t\t     [\"Initial\", nv.Value],\n\t\t\t"
 & "\t     [\"fbName1\", nv.name],\n\t\t\t\t     [\"fbName2\", nv.name],\n\t"
 & "\t\t\t     [\"ActionLabel\", nv.ActionLabel]]);\n\tif #(nv.Suffixes) is"
 & " 0 then\n\t\tsx := rep(sx, \"Suffixes\", \"\\\"\\\"\");\n\telse\n\t\tva"
 & "r suffixList = \"\";\n\t\tforeach suf in nv.Suffixes do\n\t\t\tsuffixLi"
 & "st := suffixList & \" \\\"\" & suf &\n\t\t\t\t\"\\\" \";\n\t\tend;\n\t\t"
 & "sx := rep(sx, \"Suffixes\", suffixList);\n\tend;\n\tgenericSX(nv, sx);\n"
 & "end;\n\nlet formSX = proc(nv)\n\tvar sx = Templates.form;\n\t(* plug in"
 & " all the appropriate values *)\n\tvar location = \"\";\n\n\tif nv.Check"
 & "pointedX";

CONST E3_3 =
   "Y then\n\t\tlocation :=\" (At  \" & fmt_int(nv.x) & \" \" & fmt_int(nv."
 & "y) & \"  NW Absolute) \";\n\tend;\n\n\tif nv.InitialState isnot \"Vanis"
 & "h\" then\n\t\tsx := rep(sx, \"ZChildState\", location & \"Open\");\n\te"
 & "lse\n\t\tsx := rep(sx, \"ZChildState\", location);\n\tend;\n\tif nv.Has"
 & "Menu then\n\t\tsx := rep(sx, \"MenuStructure\", \n\t\t\t\t\tmenuSX(nv))"
 & ";\n\telse\n\t\tsx := rep(sx, \"MenuStructure\", \"\");\t\n\tend;\n\tsx "
 & ":= replist(sx,\n\t [ [\"XStretch\", fmt_int(nv.StretchX)],\n\t   [\"YSt"
 & "retch\", fmt_int(nv.StretchY)],\n\t   [\"XShrink\", fmt_int(nv.ShrinkX)"
 & "],\n\t   [\"YShrink\", fmt_int(nv.ShrinkY)],\n\t   [\"TitleBgColor\", n"
 & "v.TitleBgColor],\n\t   [\"TitleFgColor\", nv.TitleFgColor],\n\t   [\"Ti"
 & "tleString\", nv.TitleString],\n\t]);\n\tsplitSX(nv, sx);\nend;\n\nlet f"
 & "rameSX = proc(nv)\n\tvar sx = Templates.frame;\t\n\tsplitSX(nv, sx);\ne"
 & "nd;\n\nlet numericSX = proc(nv)\n\tvar sx = Templates.numeric;\n\tsx :="
 & " replist(sx, [[\"Value\", fmt_int(nv.Val)],\n\t\t\t\t    [\"Min\", fmt_"
 & "int(nv.Min)],\n\t\t\t\t    [\"Max\", fmt_int(nv.Max)]\n\t\t\t\t]);\n\ti"
 & "f nv.AllowEmpty then\n\t\tsx := rep(sx, \"AllowEmpty\", \"AllowEmpty\")"
 & ";\n\telse\n\t\tsx := rep(sx, \"AllowEmpty\", \"\");\t\n\tend;\n\tif nv."
 & "HideButtons then\n\t\tsx := rep(sx, \"HideButtons\", \"HideButtons\");\n"
 & "\telse\n\t\tsx := rep(sx, \"HideButtons\", \"\");\t\n\tend;\n\tgenericS"
 & "X(nv, sx);\nend;\n\nlet scrollerSX = proc(nv, s)\n\tvar sx = s;\n\tsx :"
 & "= replist(sx, [[\"Value\", fmt_int(nv.Val)],\n\t\t\t\t    [\"Min\", fmt"
 & "_int(nv.Min)],\n\t\t\t\t    [\"Max\", fmt_int(nv.Max)],\n\t\t\t\t    [\""
 & "Thumb\", fmt_int(nv.Thumb)],\n\t\t\t\t    [\"Step\", fmt_int(nv.Step)],"
 & "\n\t\t\t\t\t]);\n\tgenericSX(nv, sx);\nend;\n\nlet textSX = proc(nv)\n\t"
 & "var sx = Templates.text;\n\tsx := replist(sx, [[\"Alignment\", nv.tOrie"
 & "ntation],\n\t\t\t\t    [\"Initial\", nv.tVal]]);\n\tgenericSX(nv, sx);\n"
 & "end;\n\nlet texteditSX = proc(nv)\n\tvar sx = Templates.textedit;\n\tif"
 & " nv.teReadOnly then\n\t\tsx := rep(sx, \"ReadOnly\", \"ReadOnly\");\n\t"
 & "else\n\t\tsx := rep(sx, \"ReadOnly\", \"\");\t\n\tend;\n\tif nv.teClip "
 & "then\n\t\tsx := rep(sx, \"Clip\", \"Clip\");\n\telse\n\t\tsx := rep(sx,"
 & " \"Clip\", \"\");\t\n\tend;\n\tif nv.teHasScrollbar then\n\t\tsx := rep"
 & "(sx, \"NoScrollbar\", \"\");\n\telse\n\t\tsx := rep(sx, \"NoScrollbar\""
 & ", \"NoScrollbar\");\t\n\te";

CONST E3_4 =
   "nd;\n\tif nv.getFromFile then\n\t\tsx := rep(sx, \"Initial\", \"From \\"
 & "\"\" & nv.teFromFile & \"\\\"\")\n\telse\n\t\tsx := rep(sx, \"Initial\""
 & ", \"Value \\\"\" & text_replaceAll(\"\\n\", \"\\\\n\",nv.teContents ) &"
 & " \"\\\"\")\n\tend;\n\tgenericSX(nv, sx);\nend;\n\nlet typeinSX = proc(n"
 & "v)\n\tvar sx = Templates.typein;\n\tif nv.tyReadOnly then\n\t\tsx := re"
 & "p(sx, \"ReadOnly\", \"ReadOnly\");\n\telse\n\t\tsx := rep(sx, \"ReadOnl"
 & "y\", \"\");\t\t\n\tend;\n\tif nv.tyExpand then\n\t\tsx := rep(sx, \"Exp"
 & "andOnDemand\", \"ExpandOnDemand\");\n\telse\n\t\tsx := rep(sx, \"Expand"
 & "OnDemand\", \"\");\t\t\n\tend;\n\tsx := rep(sx, \"Initial\", nv.tyInit)"
 & ";\n\tgenericSX(nv, sx);\nend;\n\nlet videoSX = proc(nv)\n\tvar sx = Tem"
 & "plates.video;\n\tif nv.Source is \"\" then\n\t\tsx := rep(sx, \"PlayVid"
 & "eo\", \"1\");\n\telse\n\t\tsx := rep(sx, \"PlayVideo\", \"0\");\n\tend;"
 & "\n\tsx := replist(sx, [ [\"VideoSource\", nv.Source],\n\t\t\t\t      [\""
 & "Quality\", fmt_int(nv.Quality)],\n\t\t\t\t      [\"Width\", fmt_int(nv."
 & "Width)],\n\t\t\t\t      [\"Height\", fmt_int(nv.Height)],\n\t\t\t\t    "
 & "  [\"Colours\", fmt_int(nv.Colours)],\n\t\t\t\t      [\"MSecs\", fmt_in"
 & "t(nv.MSecs)],\n\t\t\t\t      [\"AudioSource\", nv.AuSource],\n\t\t\t\t "
 & "     [\"Volume\", fmt_int(nv.Volume)],\n\t\t\t\t]); \n\tif nv.Synchrono"
 & "us then\n\t\tsx := rep(sx, \"Synchronous\", \"Synchronous\");\t\n\telse"
 & "\n\t\tsx := rep(sx, \"Synchronous\", \"\");\t\n\tend;\n\tif nv.FixedSiz"
 & "e then\n\t\tsx := rep(sx, \"FixedSize\", \"FixedSize\");\t\n\telse\n\t\t"
 & "sx := rep(sx, \"FixedSize\", \"\");\t\n\tend;\n\tif nv.Paused then\n\t\t"
 & "sx := rep(sx, \"Paused\", \"Paused\");\t\n\telse\n\t\tsx := rep(sx, \"P"
 & "aused\", \"\");\t\n\tend;\n\tif nv.Mute then\n\t\tsx := rep(sx, \"Mute\""
 & ", \"Mute\");\t\n\telse\n\t\tsx := rep(sx, \"Mute\", \"\");\t\n\tend;\n\t"
 & "if nv.IgnoreMapping then\n\t\tsx := rep(sx, \"IgnoreMapping\", \"Ignore"
 & "Mapping\");\t\n\telse\n\t\tsx := rep(sx, \"IgnoreMapping\", \"\");\t\n\t"
 & "end;\n\tgenericSX(nv, sx);\nend;\n\n\n(* procedure dispatching kludge *"
 & ")\ncomputeSX := proc(wid)\n\tmutateName(wid); (* unique sx-expression w"
 & "ill result *)\t\n        if wid.class is \"boolean\" then\n\t\tbooleanS"
 & "X(wid);\n        elsif wid.class is \"button\" then\n\t\tbuttonSX(wid);"
 & "\n\telsif wid.class is \"browser\" then\n\t\tbrowserSX(wid);\n\telsif w"
 & "id.class is \"choice\" then\n\t\tchoiceSX(wid);\n\t";

CONST E3_5 =
   "elsif wid.class is \"filebrowser\" then\n\t\tfilebrowserSX(wid);\n\tels"
 & "if wid.class is \"form\" then\n\t\tformSX(wid);\n\telsif wid.class is \""
 & "frame\" then\n\t\tframeSX(wid);\n\telsif wid.class is \"hscroll\" then\n"
 & "\t\tscrollerSX(wid, Templates.hscroll);\n\telsif wid.class is \"numeric"
 & "\" then\n\t\tnumericSX(wid);\n\telsif wid.class is \"text\" then\n\t\tt"
 & "extSX(wid);\n\telsif wid.class is \"textedit\" then\n\t\ttexteditSX(wid"
 & ");\n\telsif wid.class is \"typein\" then\n\t\ttypeinSX(wid);\n        e"
 & "lsif wid.class is \"video\" then\n\t\tvideoSX(wid);\n\telsif wid.class "
 & "is \"vscroll\" then\n\t\tscrollerSX(wid, Templates.vscroll);\n\tend;\n\t"
 & "\nend;\n\nsys_popSilence();";

CONST E4 =
   "(* Copyright (C) 1995, Digital Equipment Corporation.       *)\n(* All "
 & "rights reserved.                                     *)\n(* See the fil"
 & "e COPYRIGHT for a full description.           *)\n(*                   "
 & "                                       *)\n(* Last modified on Tue Jan "
 & "10 11:50:10 PST 1995 by mhb     *)\n\n(* Mandatory Include for all Visu"
 & "al Obliq Programs *)\n\n(* Naming Convention for Online Listing within "
 & "the VO Editor : \n\n   A comment that begins/ends with \":\" contains t"
 & "he signature of  an additional volib  proc.\n   A comment that begins/e"
 & "nds with \"=\" contains the name of a widget-class\n   and may be follo"
 & "wed by one or more method signatures.\n   A comment that begins/ends wi"
 & "th \"-\" contains the signature of a method\n  and is associated with t"
 & "he last widget-class name seen.\n   Null method signatures are ignored."
 & "\n*)\n\nmodule volib;\n\nsys_pushSilence();\n(* assert - must begin wit"
 & "h a \\n\' *)\nlet unpkList = proc(s)\n\tlet ar = text_explode(\"\\n\", "
 & "s);\n\tlet n = #(ar) -1; \n\tarray_sub(ar, 1, n);\nend;\n\nlet pkList ="
 & " proc(ar)\n\tlet n = text_implode(\'\\n\', ar);\n\tn;\nend;\n\nlet voli"
 & "bLocal = {\n\n  HOSTNAME => sys_address,\n           \n  Join => ok,\n\n"
 & "  (*: LoadFile(filename:text) returns text :*)\n  LoadFile => meth(s, f"
 & "ilename)\n    let r = rd_open(fileSys, filename);\n    let contents = r"
 & "d_getText(r, rd_length(r));\n    rd_close(r);\n    contents\n    end,\n"
 & "\n  (*: SaveFile(t:text, f:filename) returns boolean :*)\n  SaveFile =>"
 & " meth(s, t, filename)\n     try\n       let w = wr_open(fileSys, filena"
 & "me);\n       wr_putText(w, t);\n       wr_close(w);\n       true;\n    "
 & " except else\n       false;\n     end\n    end,\n\n(*=       boolean   "
 & "     =*)\n  booleanNew => meth(s,   n)\n  {\n    SELF => 0,\n    form ="
 & "> 0, \n    name => n,\n    class => \"boolean\",\n\n    (* Generic Attr"
 & "ibutes *)\n    parent => 0,\n\n    x => 0, y => 0, width =>0, height =>"
 & "0, BgColor =>\"\", FgColor => \"\",\n    Font => \"\", Rim => 0, Border"
 & " => 0, Embellishment => \"\",\n    InitialState => \"\", ResizeModel =>"
 & " \"\", \t\n\n    (* Widget Attributes *)\n    tex";

CONST E4_0 =
   "tLabel  => true, textString=>\"\", \n    pixmap => \"\", initialValue ="
 & "> false, feedbackStyle => \"\",\n\n    (*- getValue() returns boolean -"
 & "*)\n    getValue => meth(s) \n     form_getBoolean(s.form, s.name) end,"
 & "\n    (*- setValue(booleanval) -*)\n    setValue => meth(s, val) \n    "
 & "  \ts.textLabel  :=  val; \n\tform_putBoolean(s.form, s.name, val); ok "
 & "end,\t\n    (*- setLabel(tx:text) -*)\n    setLabel => meth(s, val) \t\n"
 & "\ts.textString := val;\n      \tform_putText(s.form, s.name & \"text\","
 & " \"\", val, false); ok end,\n    (*- makeDormant() -*)\n    makeDormant"
 & " => meth(s) \n     s.InitialState := \"Dormant\";\n      form_putReacti"
 & "vity(s.form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePa"
 & "ssive() -*)\n    makePassive => meth(s) \n     s.InitialState := \"Pass"
 & "ive\";\n      form_putReactivity(s.form, s.name & \"filter\", \"passive"
 & "\"); ok end,\n    (*- makeActive() -*)\n    makeActive => meth(s) \n   "
 & "   s.InitialState := \"Active\";\t\n      form_putReactivity(s.form, s."
 & "name & \"filter\", \"active\"); \n      form_popUp(s.form, s.name & \"t"
 & "op\");\n      ok end,\n    (*- makeInvisible() -*)\n    makeInvisible ="
 & "> meth(s) \n      s.InitialState := \"Vanish\";\n      refreshWidget( s"
 & ");\n    \tok end,   \n     (*- -*)\n  } \n  end,\n\n(*=       browser  "
 & " =*)\n  browserNew => meth(s,  n)\n  { \n    SELF => 0,\n    form => 0,"
 & " \n    name => n,\n    class => \"browser\",\n\n (* Generic Attributes "
 & "*)\t\n    parent => 0,\n\n    x => 0, y => 0, width =>0, height =>0, Bg"
 & "Color =>\"\", FgColor => \"\",\n    Font => \"\", Rim => 0, Border => 0"
 & ", Embellishment => \"\",\n    InitialState => \"\", ResizeModel => \"\""
 & ", \n \n  (* Widget Attributes *)\n   Quick => false, Multiplicity => fa"
 & "lse, Contents => [],\n   Selections => [], Selection => -1, (* not guar"
 & "anteed to be up to date *)\n\n    (*- numElements() returns integer -*)"
 & "\n    numElements => meth(s)\n\t#(s.getElements());\n    end,\n   \n   "
 & " (*- getElements() returns [text] -*)\n    getElements => meth(s)\n\tco"
 & "py(s.Contents);\n    end,\n  \n    (*- putElements(elems:[text]) -*)\n "
 & "   putElements => meth(s, ar)\n\ts.Contents := copy(ar);\n\ts.Select";

CONST E4_1 =
   "ions := [];\n\ts.Selection := -1;\n\tform_putText(s.form, s.name, \"Ite"
 & "ms\", pkList(s.Contents), false);\n\tok\n   end,\n\n   (*- getElement(a"
 & "tPosition:integer) returns text -*)\n   getElement => meth(s, n)\n\ts.C"
 & "ontents[n];\n   end,\n   (*- isQuick() returns boolean -*)\n   isQuick "
 & "=> meth(s)\n\ts.Quick;\n   end,\n   (*- setQuickness(q:boolean) -*)\n  "
 & " setQuickness => meth(s, q)\n\ts.Quick := q;\n\trefreshWidget(s);\n   e"
 & "nd,\n   (*- putElement(atPosition:integer, elem:text) -*)\n   putElemen"
 & "t => meth(s, n, el)\n\ts.Contents[n] := el;\n\t(* update array *)\n\tfo"
 & "rm_putText(s.form, s.name, \"Items\",  pkList(s.Contents), false);\n\ts"
 & ".getSelection(); (* to checkpoint selected items *)\n\tif s.Multiplicit"
 & "y then\n\t\tforeach i in s.Selections do\n\t\t\tform_putText(s.form, s."
 & "name, \"SelectAlso\", s.Contents[i], false);\n\t\tend;\n\telse\n\t\tif "
 & "s.Selection isnot -1 then\n\t\t\tform_putText(s.form, s.name, \"Select\""
 & ", s.Contents[s.Selection], false);\n\t\tend;\n\tend;\n\tok\n   end,\n\n"
 & "  (*- appendElement(elem:text) -*)\n   appendElement => meth(s, el)\n\t"
 & "s.Contents := s.Contents @ [el];\n\ts.putElement(#(s.Contents) - 1, el)"
 & ";\n\tok\n   end,\n\n (*- prependElement(elem:text) -*)\n  prependElemen"
 & "t => meth(s, el)\t\n\ts.insertElement(0, el);\n\tok\n   end,\t\n\n (*- "
 & "deleteElement(atPosition:integer) returns boolean -*)\n  deleteElement "
 & "=> meth(s, n)\n\ttry\n\t\tlet ar = s.getElements();\n\t\tlet sz = #(ar)"
 & ";\n\t\tlet newar = array_sub(ar, 0, n) @ array_sub(ar, n+1, (sz-n)-1);\n"
 & "\t\ts.putElements(newar);\t\t\t\t\n\t\ttrue;\n\texcept\t\n\telse\n\t\tf"
 & "alse;\n\tend; \n  end,\n\n (*- insertElement(atPosition:integer, elem:t"
 & "ext) returns boolean -*)\n  insertElement =>meth(s, n, el)\n\ttry\n\t\t"
 & "let ar = s.Contents;\n\t\tlet sz = #(ar);\n\t\ts.Contents := array_sub("
 & "ar, 0, n) @ [el]  @ array_sub(ar, n, (sz-n));\n\t\t(* update selections"
 & " *)\n\t\ts.getSelection(); (* to checkpoint selected items *)\n\t\tif s"
 & ".Multiplicity then\n\t\t\tfor i = 0 to #(s.Selections) do\n\t\t\t\tif s"
 & ".Selections[i] >= n then\n\t\t\t\t\ts.Selections[i] := s.Selections[i]+"
 & "1;\n\t\t\t\tend \n\t\t\tend;\n\t\telse\n\t\t\tif s.Selection >= n then\n"
 & "\t\t\t\ts.Selection := s.Selection + 1;\n\t\t\tend;\n\t\tend";

CONST E4_2 =
   ";\t\t\t\t\n\t\ts.putElements(n, el);\n\t\ttrue;\n\texcept\n\telse\t\n\t"
 & "\tfalse;\n\tend; \n  end,\n\n (*- selectString(st:text)  -*)\n (*-\t in"
 & "crementalif not present turns off all -*)\n  selectString =>meth(s, st)"
 & "\n\tvar op = \"Select\";\n\tif s.Multiplicity then\n\t\tforeach i in s."
 & "Contents do \n\t\t\tif i is st then\t\n\t\t\t\top := \"SelectAlso\";\n\t"
 & "\t\tend;\n\t\tend;\n\tend;\n\tform_putText(s.form, s.name, op, st, fals"
 & "e);\n\tok;\n  end,\n\n\n(*- getSelection() returns selection(s) as text"
 & " -*)\n(*- \t with \'\\n\' seperators  -*)\n   getSelection =>meth(wid)\t"
 & "\n\tlet sel = form_getText(wid.form, wid.name, \"Select\");\n\t(* check"
 & "point selections - side effect *)\n\tif wid.Multiplicity then\t\n\t\t\t"
 & "\twid.Selections :=[];\n\t\t\t\tforeach item in wid.getSelItems() do\n\t"
 & "\t\t\t\tfor i = 0 to #(wid.Contents) - 1 do\n\t\t\t\t\t\tif item is wid"
 & ".Contents[i] then\n\t\t\t\t\t\t\twid.Selections := wid.Selections @ [i]"
 & ";\n\t\t\t\t\t\tend;\n\t\t\t\t\tend;\n\t\t\t\tend;\n\t\t\telse\n\t\t\t\t"
 & "wid.Selection :=  -1;\n\t\t\t\tif sel isnot \"\" then\n\t\t\t\t\tfor i "
 & "= 0 to #(wid.Contents) - 1 do\n\t\t\t\t\t\tif sel is wid.Contents[i] th"
 & "en\n\t\t\t\t\t\t\twid.Selection := i\n\t\t\t\t\t\tend;\n\t\t\t\t\tend;\n"
 & "\t\t\t\tend;\n\t\t\tend;\n\tsel\n   end,\n\n (*- getSelItems() returns "
 & "array of text -*)\n   getSelItems =>meth(s)\t\n\tlet sel = form_getText"
 & "(s.form, s.name, \"Select\");\n\tif sel is \"\" then\n\t\t[]\n\telse\n\t"
 & "\tunpkList(\"\\n\" & sel);\n\tend;\n   end,\t\n\n   (*- toggleMultiplic"
 & "ity() switches between Uni/Multi browser-*)\n   toggleMultiplicity =>me"
 & "th(s)\t\n\tcheckptSX(s);\n\ts.Multiplicity := not(s.Multiplicity);\n\tr"
 & "ebuildWidget( s);\n\tok\n   end,\t\n   (*- makeDormant() -*)\n    makeD"
 & "ormant => meth(s) \n     s.InitialState := \"Dormant\";\n      form_put"
 & "Reactivity(s.form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- "
 & "makePassive() -*)\n    makePassive => meth(s) \n     s.InitialState := "
 & "\"Passive\";\n      form_putReactivity(s.form, s.name & \"filter\", \"p"
 & "assive\"); ok end,\n    (*- makeActive() -*)\n    makeActive => meth(s)"
 & " \n      s.InitialState := \"Active\";\t\n      form_putReactivity(s.fo"
 & "rm, s.name & \"filter\", \"active\"); \n      form_popUp(s.form, s.name"
 & " & \"top\");\n      ok end,\n    (*- makeInvisible() -*)\n    m";

CONST E4_3 =
   "akeInvisible => meth(s) \n      s.InitialState := \"Vanish\";\n      re"
 & "freshWidget( s);\n    \tok end,\n  (*- -*)\n  } \n  end,\n\n (*= button"
 & " =*)\n  buttonNew => meth(s, n)\n  { \n    SELF => 0,\n    form => 0, \n"
 & "    name => n,\n    class => \"button\",\n\n    (* Generic Attributes *"
 & ")\n    parent => 0,\n\n    x => 0, y => 0, width =>0, height =>0, BgCol"
 & "or =>\"\", FgColor => \"\",\n    Font => \"\", Rim => 0, Border => 0, E"
 & "mbellishment => \"\",\n    InitialState => \"\", ResizeModel => \"\", \n"
 & "\n   (* Widget Attributes *)\n   textLabel => true, textString => \"\","
 & " pixmap => \"\",\n   Guard => false, Trill => false,\n\n    (*- makeDor"
 & "mant() -*)\n    makeDormant => meth(s) \n     s.InitialState := \"Dorma"
 & "nt\";\n      form_putReactivity(s.form, s.name & \"filter\", \"dormant\""
 & "); ok end,\n    (*- makePassive() -*)\n    makePassive => meth(s) \n   "
 & "  s.InitialState := \"Passive\";\n      form_putReactivity(s.form, s.na"
 & "me & \"filter\", \"passive\"); ok end,\n    (*- makeActive() -*)\n    m"
 & "akeActive => meth(s) \n      s.InitialState := \"Active\";\t\n      for"
 & "m_putReactivity(s.form, s.name & \"filter\", \"active\"); \n      form_"
 & "popUp(s.form, s.name & \"top\");\n      ok end,\n    (*- makeInvisible("
 & ") -*)\n    makeInvisible => meth(s) \n      s.InitialState := \"Vanish\""
 & ";\n      refreshWidget( s);\n    \tok end,\n    \n    (*- putText(tx:te"
 & "xt) -*)\n    putText => meth(s, val) \t\n      s.textString := val;\t\n"
 & "      if not (s.textLabel) then\n\ts.textLabel := true;\n\trefreshWidge"
 & "t( s);\n      else\n\tform_putText(s.form, s.name & \"text\", \"\", val"
 & ", false); \n     end;\n    ok end,\n    (*- putBgColor(clr:text) -*)\n "
 & "   putBgColor => meth(s, val) \t\n      s.BgColor := val;\n      form_p"
 & "utText(s.form, s.name & \"text\", \"BgColor\", val, false); ok end,\n  "
 & "  (*- getText() returns text -*)\n    getText => meth(s) \n\ts.textStri"
 & "ng\n    end,\n   (*- putPixmap(filename:text) -*)\n    putPixmap => met"
 & "h(s, val) \t\n      s.pixmap := val;\n      if s.textLabel then\n\ts.te"
 & "xtLabel := false;\n\trefreshWidget( s);\n      else\n\tform_putText(s.f"
 & "orm, s.name & \"pixmap\", \"\", val, false); \n     end;\n      ok end,"
 & "\n   (*- ";

CONST E4_4 =
   "-*)\n  } \n  end,\n\n (*= choice  =*)\n  choiceNew => meth(s,  n)\n  { "
 & "\n    SELF => 0,\n    form => 0, \n    name => n,\n    class => \"choic"
 & "e\",\n\n   (* Generic Attributes *)\n    parent => 0,\n\n    x => 0, y "
 & "=> 0, width =>0, height =>0, BgColor =>\"\", FgColor => \"\",\n    Font"
 & " => \"\", Rim => 0, Border => 0, Embellishment => \"\",\n    InitialSta"
 & "te => \"\", ResizeModel => \"\", \n\n     (* Widget Attributes *)\n    "
 & "textLabel => true, textString => \"\", pixmap => \"\", \n    initialVal"
 & "ue => false, feedbackStyle => \"CheckBox\", \n  \n \n    (*- getValue()"
 & " returns boolean -*)\n    getValue => meth(s) \n      form_getBoolean(s"
 & ".form, s.name) end,\n    (*- setValue(booleanval) -*)\n    setValue => "
 & "meth(s, val) \n      form_putBoolean(s.form, s.name, val); ok end,\n   "
 & " (*- setLabel(tx:text) -*)\n    setLabel => meth(s, val) \n      s.text"
 & "String := val;\t\n      form_putText(s.form, s.name & \"text\", \"\", v"
 & "al, false); ok end,\n     (*- makeDormant() -*)\n    makeDormant => met"
 & "h(s) \n     s.InitialState := \"Dormant\";\n      form_putReactivity(s."
 & "form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePassive()"
 & " -*)\n    makePassive => meth(s) \n     s.InitialState := \"Passive\";\n"
 & "      form_putReactivity(s.form, s.name & \"filter\", \"passive\"); ok "
 & "end,\n    (*- makeActive() -*)\n    makeActive => meth(s) \n      s.Ini"
 & "tialState := \"Active\";\t\n      form_putReactivity(s.form, s.name & \""
 & "filter\", \"active\"); \n      form_popUp(s.form, s.name & \"top\");\n "
 & "     ok end,\n    (*- makeInvisible() -*)\n    makeInvisible => meth(s)"
 & " \n      s.InitialState := \"Vanish\";\n      refreshWidget( s);\n    \t"
 & "ok end,    \n  (*- -*)\n  } \n  end,\n\n (*= filebrowser =*)\n  filebro"
 & "wserNew => meth(s,   n)\n  { \n    SELF => 0,\n    form => 0, \n    nam"
 & "e => n,\n    class => \"filebrowser\",\n\n   (* Generic Attributes *)\n"
 & "    parent => 0,\n\n    x => 0, y => 0, width =>0, height =>0, BgColor "
 & "=>\"\", FgColor => \"\",\n    Font => \"\", Rim => 0, Border => 0, Embe"
 & "llishment => \"\",\n    InitialState => \"\", ResizeModel => \"\", \n\n"
 & "    (* Widget Attributes *)\n    LabelFont => \"\", ReadOnly => false,\n"
 & "    V";

CONST E4_5 =
   "alue => \".\", Suffixes => [], ActionLabel => \"\",\n\n    (*- getFilen"
 & "ame() returns text -*)\n    getFilename => meth(s) \n      form_getText"
 & "(s.form, s.name, \"\") end,    \n\n    (*- setFilename(fnm:text) -*)\n "
 & "   setFilename => meth(s, fnm) \n      form_putText(s.form, s.name, \"\""
 & ",fnm, false ); ok end,    \n\n    (*- setActionLabel(lab:text)  -*)\n  "
 & "   setActionLabel => meth(s, lab)\n\ts.ActionLabel := lab;\n\trefreshWi"
 & "dget( s);\n\tok end,\n      (*- makeDormant() -*)\n    makeDormant => m"
 & "eth(s) \n     s.InitialState := \"Dormant\";\n      form_putReactivity("
 & "s.form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePassive"
 & "() -*)\n    makePassive => meth(s) \n     s.InitialState := \"Passive\""
 & ";\n      form_putReactivity(s.form, s.name & \"filter\", \"passive\"); "
 & "ok end,\n    (*- makeActive() -*)\n    makeActive => meth(s) \n      s."
 & "InitialState := \"Active\";\t\n      form_putReactivity(s.form, s.name "
 & "& \"filter\", \"active\"); \n      form_popUp(s.form, s.name & \"top\")"
 & ";\n      ok end,\n    (*- makeInvisible() -*)\n    makeInvisible => met"
 & "h(s) \n      s.InitialState := \"Vanish\";\n      refreshWidget( s);\n "
 & "   \tok end,\t   \n    (*- -*)\n  } \n  end,\n\n (*= form =*)\n  formNe"
 & "w => meth(s,  n)\n  { \n    SELF => 0,\n    form => 0, \n    name => n,"
 & "\n    class => \"form\",\n\n   (* Generic Attributes *)\n    parent => "
 & "0,\n\n    x => 0, y => 0, width =>0, height =>0, BgColor =>\"\", FgColo"
 & "r => \"\",\n    Font => \"\", Rim => 0, Border => 0, Embellishment => \""
 & "\",\n    InitialState => \"\", ResizeModel => \"\", \t\n\n    (* Split "
 & "Attributes *)\n    Texture => \"\", children => [],\n\n    (* Form Attr"
 & "ibutes *)\n    ParentForm => 0, ChildForms => [],\n    HasMenu => false"
 & ", MenuBgColor => \"\", MenuFgColor => \"\",\n    MenuFont => \"\", Menu"
 & " => [],\n    TitleBgColor => \"\",  TitleFgColor => \"\",\n    TitleStr"
 & "ing => \"\", StretchX => 0, StretchY => 0,\n    ShrinkX => 0,  ShrinkY "
 & "=> 0,\n\n    CheckpointedXY => false, (* if false pops up in default po"
 & "sition *)\n \n    (*- show(), shows form (toplevel or anchored)-*)\n   "
 & " show => meth(s) \n      if s.ParentForm is 0 then\n\tif  s.form is 0 t"
 & "hen";

CONST E4_6 =
   "\n\t\ts.SELF.FORM := form_new(computeSX(s));\n\t\ts.SELF.VOAttachCBacks"
 & "();   \n\t\tform_show(s.form);\n\tend\n      else\n\t s.popUp();\n     "
 & " end;\n   ok end,\n    (*- hide(), hides form (toplevel or anchored) -*"
 & ")\n    hide => meth(s) \n     if s.ParentForm is 0  then\n\tif  s.form "
 & "isnot 0 then\n\t      checkptSX(s);\n\t      form_hide(s.form); \n     "
 & "  \t      s.SELF.FORM := 0;\n\tend\n      else \n\t  s.close();    \n  "
 & "    end;\n     ok end,\n    (*- putTitleString(titstr:text) -*)\n    pu"
 & "tTitleString => meth(s, val)\n      s.TitleString := val;\n      form_p"
 & "utText(s.form, s.name & \"titlestring\", \"\", val, false); ok end,\n  "
 & "  (*- putBgColor(clr:text) -*)\n    putBgColor => meth(s, val) \t\n    "
 & "  s.BgColor := val;\n      form_putText(s.form, s.name & \"background\""
 & ", \"BgColor\", val, false); ok \n      end,\n    (*- getText() returns "
 & "text -*)\n    getText => meth(s) \n      form_getText(s.form, s.name & "
 & "\"titlestring\", \"\") end,\n     (*- popUp(), shows anchored form -*)\n"
 & "    popUp => meth(s)\n      form_popUp(s.form, s.name); \n      form_pu"
 & "tReactivity(s.form, s.name & \"filter\", \"active\"); \n      ok end,\n"
 & "    (*- close(), hides anchored form -*)\n    close => meth(s) \n      "
 & "form_popDown(s.form, s.name); ok end,\n    (*- hasSelectedChoice() retu"
 & "rns boolean -*)\n    hasSelectedChoice => meth(s)\n\ttry\n\t   s.getCho"
 & "ice();   true;\n        except else false end;\n    end,\t \n    (*- ge"
 & "tChoice() : text, exception if none selected. -*)\n    (*- - return val"
 & "ue is name of choice, not label -*)\n    getChoice => meth(s)\n \tform_"
 & "getChoice(s.form, s.name & \"radio\")  end,\n     (*- putChoice(textnam"
 & "e:text),  exception if nonexistent -*)\n     (*- - \ttextname is the  n"
 & "ame(not label) of the choice -*)\n    putChoice => meth(s, item)\n \tfo"
 & "rm_putChoice(s.form, s.name & \"radio\", item); ok\n    end,\t\n    (*-"
 & " -*)\n  } \n  end,\n\n  (*= frame =*)\n  frameNew => meth(s,  n)\n  { \n"
 & "    SELF => 0,\n    form => 0, \n    name => n,\n    class => \"frame\""
 & ",\n\n    (* Generic Attributes *)\n    parent => 0,\n\n    x => 0, y =>"
 & " 0, width =>0, height =>0, BgColor =>\"\", FgColor => \"\"";

CONST E4_7 =
   ",\n    Font => \"\", Rim => 0, Border => 0, Embellishment => \"\",\n   "
 & " InitialState => \"\", ResizeModel => \"\", \t\n\n    Texture => \"\", "
 & "children => 0,\t\n\n    (*- hasSelectedChoice() returns boolean -*)\n  "
 & "  hasSelectedChoice => meth(s)\n\ttry\n\t   s.getChoice();   true;\n   "
 & "     except else false end;\n   end,\t \n    (*- getChoice() returns te"
 & "xt, raises exception if unselected -*)\n    (*- -\tThe return value is "
 & "the name of the choice, not its label -*)\n    getChoice => meth(s)\n \t"
 & "form_getChoice(s.form, s.name & \"radio\")  end,\n    (*- putChoice(tex"
 & "tname: text), raises exception if nonexistant -*)\n    (*- - \ttextname"
 & " is a text containing the name (not label) of the choice -*)\n    putCh"
 & "oice => meth(s, item)\n \tform_putChoice(s.form, s.name & \"radio\", it"
 & "em); ok\n    end,\t\n    (*- makeActive() -*)\n    makeActive => meth(s"
 & ") \n      s.InitialState := \"Active\";\t\n      form_putReactivity(s.f"
 & "orm, s.name & \"filter\", \"active\"); \n      form_popUp(s.form, s.nam"
 & "e & \"top\");\n      ok end,\n    (*- makeInvisible() -*)\n    makeInvi"
 & "sible => meth(s) \n      s.InitialState := \"Vanish\";\n      refreshWi"
 & "dget( s);\n    \tok end,\n    \n    (*- -*)\n  } \n  end,\n\n (*= hscro"
 & "ll =*)\n  hscrollNew => meth(s,  n)\n  { \n    SELF => 0,\n    form => "
 & "0, \n    name => n,\n    class => \"hscroll\",\n\n   (* Generic Attribu"
 & "tes *)\n    parent => 0,\n\n    x => 0, y => 0, width =>0, height =>0, "
 & "BgColor =>\"\", FgColor => \"\",\n    Font => \"\", Rim => 0, Border =>"
 & " 0, Embellishment => \"\",\n    InitialState => \"\", ResizeModel => \""
 & "\", \n\n   (* Widget Attributes *)\n   Min => 0, Max => 0, Val => 0,\n "
 & "  Thumb => 0, Step => 0,\n\n   (*- getValue() returns integer -*)\n    "
 & "getValue => meth(s) \n      form_getInt(s.form, s.name , \"\") end,\n  "
 & "  (*- getMin() returns integer -*)\n    getMin => meth(s) \n      form_"
 & "getInt(s.form, s.name , \"Min\") end,\n    (*- getMax() returns integer"
 & " -*)\n    getMax => meth(s) \n      form_getInt(s.form, s.name , \"Max\""
 & ") end,\n    (*- setValue(val) -*)\n    setValue => meth(s, val) \n     "
 & " form_putInt(s.form, s.name , \"\", val); ok  end,\n    (*- setMi";

CONST E4_8 =
   "n(minval) -*)\n    setMin => meth(s, val) \n\ts.Min := val;\n      form"
 & "_putInt(s.form, s.name , \"Min\", val); ok end,\n    (*- setMax(maxval)"
 & "  -*)\n    setMax => meth(s, val) \n\ts.Max := val;\n      form_putInt("
 & "s.form, s.name , \"Max\", val); ok  end,\n    (*- -*)\n  } \n  end,\n\n"
 & "  (*= menuitem =*)\n  menuItemNew => meth(s,   l, n, lev, initst)\n  { "
 & "\n    SELF => 0,\n    form => 0, \n    Label => l,\n    name => n,\n   "
 & " class => \"menuItem\",\n\n    Level => lev,\n    initialState => inits"
 & "t,\n\n    (*- setLabel(tx:text) -*)\n    setLabel => meth(s, val) \t\n\t"
 & "s.Label := val;\n      form_putText(s.form, s.name & \"Label\", \"\", v"
 & "al, false); ok end,\n    (*- makeDormant() -*)\n    makeDormant => meth"
 & "(s) \n     s.InitialState := \"Dormant\";\n      form_putReactivity(s.f"
 & "orm, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePassive() "
 & "-*)\n    makePassive => meth(s) \n      s.InitialState := \"Passive\";\n"
 & "      form_putReactivity(s.form, s.name & \"filter\", \"passive\"); ok "
 & "end,\n    (*- makeActive() -*)\n    makeActive => meth(s) \n      s.Ini"
 & "tialState := \"Active\";\t\n      form_putReactivity(s.form, s.name & \""
 & "filter\", \"active\"); ok end,\n     (*- makeInvisible() -*)\n    makeI"
 & "nvisible => meth(s) \n      s.InitialState := \"Vanish\";\t\n      form"
 & "_putReactivity(s.form, s.name & \"filter\", \"vanished\"); ok end,\n   "
 & "(*- -*)\n  } \n  end,\n\n  (*= numeric =*)\n  numericNew => meth(s,  n)"
 & "\n  { \n    SELF => 0,\n    form => 0, \n    name => n,\n    class => \""
 & "numeric\",\n\n   (* Generic Attributes *)\n    parent => 0,\n\n    x =>"
 & " 0, y => 0, width =>0, height =>0, BgColor =>\"\", FgColor => \"\",\n  "
 & "  Font => \"\", Rim => 0, Border => 0, Embellishment => \"\",\n    Init"
 & "ialState => \"\", ResizeModel => \"\", \n\n   (* Widget Attributes *)\n"
 & "   AllowEmpty => false, HideButtons => false,\n   Min => 0, Max => 0, V"
 & "al => 0, \n\n   (*- getValue() returns integer -*)\n    getValue => met"
 & "h(s) \n      form_getInt(s.form, s.name , \"\") end,\n    (*- getMin() "
 & "returns integer -*)\n    getMin => meth(s) \n      form_getInt(s.form, "
 & "s.name , \"Min\") end,\n    (*- getMax() returns integer -*)\n    get";

CONST E4_9 =
   "Max => meth(s) \n      form_getInt(s.form, s.name , \"Max\") end,\n    "
 & "(*- setValue(val) -*)\n    setValue => meth(s, val) \n      form_putInt"
 & "(s.form, s.name , \"\", val); ok  end,\n    (*- setMin(minval) -*)\n   "
 & " setMin => meth(s, val)\n\ts.Min := val; \n      form_putInt(s.form, s."
 & "name , \"Min\", val); ok end,\n    (*- setMax(maxval)  -*)\n    setMax "
 & "=> meth(s, val) \n      s.Max := val;\n      form_putInt(s.form, s.name"
 & " , \"Max\", val); ok  end,\n    (*- -*)\n  } \n  end,\n\n(*= text =*) \n"
 & "  textNew => meth(s,  n)\n  { \n    SELF => 0,\n    form => 0, \n    na"
 & "me => n,\n    class => \"text\",\n\n   (* Generic Attributes *)\n    pa"
 & "rent => 0,\n\n    x => 0, y => 0, width =>0, height =>0, BgColor =>\"\""
 & ", FgColor => \"\",\n    Font => \"\", Rim => 0, Border => 0, Embellishm"
 & "ent => \"\",\n    InitialState => \"\", ResizeModel => \"\", \n\n    (*"
 & " Widget Attributes *)\n    tOrientation => \"Center\", tVal => \"\",\n\n"
 & "    (*- getText() returns text -*)\n    getText => meth(s) \n      form"
 & "_getText(s.form, s.name, \"\") end,\n    (*- putText(val:text) -*)\n   "
 & " putText => meth(s, val) \n     s.tVal := val;\n      form_putText(s.fo"
 & "rm, s.name, \"\", val, false); ok end,\n    (*- appendText(val:text) -*"
 & ")\n    appendText => meth(s, val) \n\ts.tVal := s.tVal @ val;\n      fo"
 & "rm_putText(s.form, s.name, \"\", val, true); ok end,\n    (*- putBgColo"
 & "r(clr:text) -*)\n    putBgColor => meth(s, val) \n\ts.BgColor := val;\n"
 & "      form_putText(s.form, s.name, \"BgColor\", val, false); ok end,\n "
 & "   (*- putFgColor(clr:text) -*)\n    putFgColor => meth(s, val) \n\ts.F"
 & "gColor := val;\n      form_putText(s.form, s.name, \"FgColor\", val, fa"
 & "lse); ok end,\n    (*- putValue(intval:integer) -*)\n    putValue => me"
 & "th(s, val) \n      var v = ok; \n      try v := fmt_int(val) except els"
 & "e v := \"\" end;\n\ts.tVal := v;\n      form_putText(s.form, s.name, \""
 & "\", v, false); \n      ok end,\n     (*- makeActive() -*)\n    makeActi"
 & "ve => meth(s) \n      s.InitialState := \"Active\";\t\n      form_putRe"
 & "activity(s.form, s.name & \"filter\", \"active\"); \n      form_popUp(s"
 & ".form, s.name & \"top\");\n      ok end,\n     (*- makeInvis";

CONST E4_10 =
   "ible() -*)\n    makeInvisible => meth(s) \n      s.InitialState := \"Va"
 & "nish\";\n      refreshWidget( s);\n    \tok end,\t   \n    (*- -*)\n  }"
 & "\n  end,\n\n(*= textedit =*) \n  texteditNew => meth(s,  n)\n  { \n    "
 & "SELF => 0,\n    form => 0, \n    name => n,\n    class => \"textedit\","
 & "\n\n   (* Generic Attributes *)\n    parent => 0,\n\n    x => 0, y => 0"
 & ", width =>0, height =>0, BgColor =>\"\", FgColor => \"\",\n    Font => "
 & "\"\", Rim => 0, Border => 0, Embellishment => \"\",\n    InitialState ="
 & "> \"\", ResizeModel => \"\", \n\n   (* Widget Attributes *)\n    teRead"
 & "Only => false, teClip => false, teHasScrollbar => true,\n    teContents"
 & " => \"\", teFromFile => \"\", getFromFile => false,\n    \n    (*- getT"
 & "ext() returns text -*)\n    getText => meth(s) \n      form_getText(s.f"
 & "orm, s.name, \"\") end,\n    (*- putText(t:text) -*)\n    putText => me"
 & "th(s, val) \n      form_putText(s.form, s.name, \"\", val, false); ok e"
 & "nd,\n    (*- appendText(t:text) -*)\n    appendText => meth(s, val) \n "
 & "     form_putText(s.form, s.name, \"\", val, true); ok end,\n    (*- fl"
 & "ush() -*)\n    flush => meth(s) \n      form_putText(s.form, s.name, \""
 & "\", \"\", false); ok end,\n      (*- makeDormant() -*)\n    makeDormant"
 & " => meth(s) \n     s.InitialState := \"Dormant\";\n      form_putReacti"
 & "vity(s.form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePa"
 & "ssive() -*)\n    makePassive => meth(s) \n      s.InitialState := \"Pas"
 & "sive\";\n      form_putReactivity(s.form, s.name & \"filter\", \"passiv"
 & "e\"); ok end,\n    \n   (*- putBgColor(clr:text) -*)\n    putBgColor =>"
 & " meth(s, val) \t\n\ts.BgColor := val;\n      form_putText(s.form, s.nam"
 & "e, \"BgColor\", val, false); ok end,\n     (*- putFgColor(clr:text) -*)"
 & "\n     putFgColor => meth(s, val) \n     s.FgColor := val;\n      form_"
 & "putText(s.form, s.name, \"FgColor\", val, false); ok end,\n(*- makeActi"
 & "ve() -*)\n    makeActive => meth(s) \n      s.InitialState := \"Active\""
 & ";\t\n      form_putReactivity(s.form, s.name & \"filter\", \"active\");"
 & " \n      form_popUp(s.form, s.name & \"top\");\n      ok end,\n (*- mak"
 & "eInvisible() -*)\n    makeInvisible => meth(s) \n      s.Initial";

CONST E4_11 =
   "State := \"Vanish\";\n      refreshWidget( s);\n    \tok end,\n   (*- -"
 & "*)\n  }\n  end,\n\n(*= typein =*)\n  typeinNew => meth(s,  n)\n  { \n  "
 & "  SELF => 0,\n    form => 0, \n    name => n,\n    class => \"typein\","
 & "\n\n    (* Generic Attributes *)\n    parent => 0,\n\n    x => 0, y => "
 & "0, width =>0, height =>0, BgColor =>\"\", FgColor => \"\",\n    Font =>"
 & " \"\", Rim => 0, Border => 0, Embellishment => \"\",\n    InitialState "
 & "=> \"\", ResizeModel => \"\", \n\n    (* Widget Attributes *)\n     tyR"
 & "eadOnly => false, tyExpand => false, tyInit => \"\",\n\n   \n    (*- pu"
 & "tText(t:text) -*)\n    putText => meth(s, val) \n      form_putText(s.f"
 & "orm, s.name, \"\", val, false); ok end,\n    (*- appendText(t:text) -*)"
 & "\n    appendText => meth(s, val) \n      form_putText(s.form, s.name, \""
 & "\", val, true); ok end,\n    (*- getText() returns text -*)\n    getTex"
 & "t => meth(s) \n      form_getText(s.form, s.name, \"\") end,\n   (*- fl"
 & "ush() -*)\n    flush => meth(s) \n      form_putText(s.form, s.name, \""
 & "\", \"\", false); ok end,\n\n(*- makeDormant() -*)\n    makeDormant => "
 & "meth(s) \n     s.InitialState := \"Dormant\";\n      form_putReactivity"
 & "(s.form, s.name & \"filter\", \"dormant\"); ok end,\n    (*- makePassiv"
 & "e() -*)\n    makePassive => meth(s) \n     s.InitialState := \"Passive\""
 & ";\n      form_putReactivity(s.form, s.name & \"filter\", \"passive\"); "
 & "ok end,\n    (*- makeActive() -*)\n    makeActive => meth(s) \n      s."
 & "InitialState := \"Active\";\t\n      form_putReactivity(s.form, s.name "
 & "& \"filter\", \"active\"); \n      form_popUp(s.form, s.name & \"top\")"
 & ";\n      ok end,\n    (*- makeInvisible() -*)\n    makeInvisible => met"
 & "h(s) \n      s.InitialState := \"Vanish\";\n      refreshWidget( s);\n "
 & "   \tok end,\n    \n\n   (*- putBgColor(clr:text) -*)\n    putBgColor ="
 & "> meth(s, val) \t\n\ts.BgColor := val;\n      form_putText(s.form, s.na"
 & "me, \"BgColor\", val, false); ok end,\n     (*- putFgColor(clr:text) -*"
 & ")\n     putFgColor => meth(s, val) \n     s.FgColor := val;\n      form"
 & "_putText(s.form, s.name, \"FgColor\", val, false); ok end,  \n  }\n  en"
 & "d,\n\n(*= vscroll =*)\n  vscrollNew => meth(s,  n)\n  { \n    SELF => 0"
 & ",";

CONST E4_12 =
   "\n    form => 0, \n    name => n,\n    class => \"vscroll\",\n\n   (* G"
 & "eneric Attributes *)\n    parent => 0,\n\n    x => 0, y => 0, width =>0"
 & ", height =>0, BgColor =>\"\", FgColor => \"\",\n    Font => \"\", Rim ="
 & "> 0, Border => 0, Embellishment => \"\",\n    InitialState => \"\", Res"
 & "izeModel => \"\", \n \n    (* Widget Attributes *)\n   Min => 0, Max =>"
 & " 0, Val => 0,\n   Thumb => 0, Step => 0,\n\n   (*- getValue() returns i"
 & "nteger -*)\n    getValue => meth(s) \n      form_getInt(s.form, s.name "
 & ", \"\") end,\n    (*- getMin() returns integer -*)\n    getMin => meth("
 & "s) \n      form_getInt(s.form, s.name , \"Min\") end,\n    (*- getMax()"
 & " returns integer -*)\n    getMax => meth(s) \n      form_getInt(s.form,"
 & " s.name , \"Max\") end,\n    (*- setValue(val) -*)\n    setValue => met"
 & "h(s, val) \n      form_putInt(s.form, s.name , \"\", val); ok  end,\n  "
 & "  (*- setMin(minval) -*)\n    setMin => meth(s, val) \n\ts.Min := val;\n"
 & "      form_putInt(s.form, s.name , \"Min\", val); ok end,\n    (*- setM"
 & "ax(maxval)  -*)\n    setMax => meth(s, val) \n\ts.Max := val;\n      fo"
 & "rm_putInt(s.form, s.name , \"Max\", val); ok  end,\n    (*- -*)\n  } \n"
 & "  end,\n\n(*= video =*)\n  videoNew => meth(s,  n)\n  { \n    SELF => 0"
 & ",\n    form => 0, \n    name => n,\n    class => \"video\",\n\n   (* Ge"
 & "neric Attributes *)\n    parent => 0,\n\n    x => 0, y => 0, width =>0,"
 & " height =>0, BgColor =>\"\", FgColor => \"\",\n    Font => \"\", Rim =>"
 & " 0, Border => 0, Embellishment => \"\",\n    InitialState => \"\", Resi"
 & "zeModel => \"\", \n\n    (* Widget Attributes *)\n     Source => \"\", "
 & "Quality => 0, Width => 0, Height => 0,\n     Colours => 0, MSecs => 0, "
 & "Synchronous => false,\n     FixedSize => false, Paused => false,\n \n  "
 & "  AuSource => \"\", Volume => 0, Mute => false, \n    IgnoreMapping => "
 & "false,\n\n    (*- setQuality(val:integer) returns boolean -*)\n    setQ"
 & "uality => meth(s, val) \t\t\n     try\n      form_putInt(s.form, s.name"
 & ", \"Quality\", val); \n      true\n     except else false  end\n     en"
 & "d,\n   (*- setWidth(wid:integer) -*)\n    setWidth => meth(s, val) \t\t"
 & "\n      form_putInt(s.form, s.name, \"Width\", val); ok end,\n  (*-";

CONST E4_13 =
   " setSource(src:text) returns ok -*)\n    setSource => meth(s, src)\n\ts"
 & ".AuSource := src;\n    \ts.Source := src; refreshWidget( s); ok  end,\n"
 & "   (*- setHeight(ht:integer) -*)\n    setHeight => meth(s, val) \t\t\t\n"
 & "      form_putInt(s.form, s.name, \"Height\", val); ok end,\n   (*- set"
 & "FramesPerSec(fps:integer) -*)\n    setFramesPerSec => meth(s, val) \t\t"
 & "\t\n      form_putInt(s.form, s.name, \"MSecs\", (1000 /val)); ok end,\n"
 & "   (*- setVolume(v:integer) returns boolean -*)\n    setVolume => meth("
 & "s, val) \t\t\n      try\t\n      \tform_putInt(s.form, s.name & \"audio"
 & "\" , \"Volume\", val);\n\ttrue\n      except else\n\tfalse\n      end\n"
 & "     end, \n    (*- setMute(onoff:boolean) -*)\n     setMute => meth(s,"
 & " val)\n\tform_putBool(s.form, s.name & \"audio\" , \"Mute\", val);\t\n "
 & "       ok end,\n    (*- setIgnoreMapping(onoff:boolean) -*)\n      setI"
 & "gnoreMapping => meth(s, val)\n\tform_putBool(s.form, s.name & \"audio\""
 & " , \"IgnoreMapping\", val);\t\n        ok end,\n     (*- setSynchronous"
 & "(onoff:boolean)  -*)\n      setSynchronous => meth(s, val)\n\tform_putB"
 & "ool(s.form, s.name, \"Synchronous\", val);\t\n        ok end,\n     (*-"
 & " setPaused(onoff:boolean) -*)\n      setPaused => meth(s, val)\n\tform_"
 & "putBool(s.form, s.name, \"Paused\", val);\t\n        ok end,\n     (*- "
 & "setFixedSize(onoff:boolean) -*)\n      setFixedSize => meth(s, val)\n\t"
 & "form_putBool(s.form, s.name, \"FixedSize\", val);\t\n        ok end,\n "
 & "     (*- makeActive() -*)\n    makeActive => meth(s) \n      s.InitialS"
 & "tate := \"Active\";\t\n      form_putReactivity(s.form, s.name & \"filt"
 & "er\", \"active\"); \n      form_popUp(s.form, s.name & \"top\");\n     "
 & " ok end,\n    (*- makeInvisible() -*)\n    makeInvisible => meth(s) \n "
 & "     s.InitialState := \"Vanish\";\n      refreshWidget( s);\n    \tok "
 & "end,\n    \n     (*- -*)\n  } \n  end,\n\n(* placeholders for restricte"
 & "d access procs  *)\nprocessNew => ok,\nrdOpen => ok,\nwrOpen =>  ok,\nw"
 & "rOpenAppend => ok\n};\n\n\n(* Some useful procedures that will be copie"
 & "d into volibLocal\n    in cases where the computation needs to happen l"
 & "ocally *)\n\n(*: Join(ssn:text, host:text) returns boolean  :*)";

CONST E4_14 =
   "\nlet Join = proc(ssn, host) \n  try\n    let sessionConst = net_import"
 & "(ssn, host);\n    (sessionConst.New)(volibLocal);\n    true\n  except e"
 & "lse \n    false\n  end; \nend;\n\n(* normal versions of restricted acce"
 & "ss procs  *)\n(*: processNew(nameAndArgs:[text], mergeOut:boolean) retu"
 & "rns process :*)\nvar processNew = proc(nameAndArgs, mergeOut) \n\tproce"
 & "ss_new(processor, nameAndArgs, mergeOut)\nend;\n\n(*: rdOpen(filename:t"
 & "ext) returns reader :*)\nvar rdOpen = proc(fnm) \n\trd_open(fileSys, fn"
 & "m)\nend;\n\n(*: wrOpen(filename:text) returns writer :*)\nvar wrOpen = "
 & " proc(fnm) \n\t\twr_open(fileSys, fnm);\nend;\n\n(*: wrOpenAppend(filen"
 & "ame:text) returns writer :*)\nvar wrOpenAppend = proc(fnm) \n\t\twr_ope"
 & "nAppend(fileSys, fnm);\nend;\n\n\nvolibLocal.Join := Join;\n\nvolibLoca"
 & "l.processNew := meth(s, n , mer)\n\tprocessNew(n, mer)\nend;\n\nvolibLo"
 & "cal.rdOpen := meth(s, fnm)\n\trdOpen(fnm)\nend;\n\nvolibLocal.wrOpen :="
 & " meth(s, fnm)\n\twrOpen(fnm)\nend;\n\nvolibLocal.wrOpenAppend := meth(s"
 & ", fnm)\n\twrOpenAppend(fnm)\nend;\nsys_popSilence();\n\n\n";

BEGIN
END VORunBundle.