MODULE MyBundle;
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..21] OF TEXT {
"Titles.fv",
"Doc.fv",
"leftArrow.pbm",
"OpenURL.fv",
"unmapped.pbm",
"NWDiagonal",
"Help.fv",
"menuArrow.pbm",
"Search.fv",
"Deck.fv",
"iconize.pbm",
"MButton.fv",
"rightArrow.pbm",
"Workspace.fv",
"FreeDoc.fv",
"mapped.pbm",
"Rename.fv",
"macros.fv",
"NEDiagonal",
"Help.html",
"pulldown.pbm",
NIL
};
VAR Elements := ARRAY [0..21] OF TEXT {
E0,
E1,
E2,
E3,
E4,
E5,
E6,
E7,
E8,
E9,
E10,
E11,
E12,
E13,
E14,
E15,
E16,
E17,
E18,
NIL (* E19 .. E19_0 *),
E20,
NIL
};
PROCEDURE GetElt (n: INTEGER): TEXT =
<*FATAL Thread.Alerted, Wr.Failure *>
VAR wr := TextWr.New ();
BEGIN
CASE n OF
| 19 =>
Wr.PutText (wr, E19);
Wr.PutText (wr, E19_0);
ELSE (*skip*)
END;
RETURN TextWr.ToText (wr);
END GetElt;
CONST E0 =
"(ZChild %titlesDialog\r\n (Insert \"macros.fv\")\r\n (Shape (Width + "
& "inf)\r\n (Border (Pen 2)\r\n (VBox\r\n (HBox \r\n "
& " (Shape (Width + inf) (ZMove (Text %titlesDlgBanner \"Goto Page ...\""
& ")))\r\n (ZGrow (Pixmap \"grow.pbm\")))\r\n (VBox\r\n "
& " (Shape (Height 75 - 50 + Inf) (Browser %titlesBrowser Quick (BgC"
& "olor \"VeryLightGray\")))\r\n Bar\r\n (Glue 10)\r\n "
& " (HBox (Glue 10) \r\n (NoStretch \"Document number: \""
& ") \r\n (NoStretch (Numeric FirstFocus %titlesNumeric (Min 1)"
& ")) (Glue 10)\r\n Fill)\r\n (Glue 10)\r\n ("
& "HBox \r\n (DefaultBtn titlesButton \"Goto\") \r\n "
& " (CloseBtn \"Cancel\"))\r\n (Glue 10))))))";
CONST E1 =
"(VBox\r\n (Insert \"macros.fv\")\r\n (HBox\r\n (Shape (Width + Inf"
& " - Inf)\r\n (Source %source (Text %docName LeftAlign \"Doc Name\")"
& "))\r\n (Button %hotlistButton \"H\")\r\n (Button %killButton \"D\""
& "))\r\n (Bar 2)\r\n (Shape (Width - Inf) (Height - Inf) (Generic %gen"
& ")))";
CONST E2 =
"P4\r\n16 16\r\n\000\000\000\000\000\000\001\200\003\200\007\370\017\370"
& "\037\370\037\370\017\370\007\370\003\200\001\200\000\000\000\000\000\000"
;
CONST E3 =
"(ZChild %urlDialog\r\n (Insert \"macros.fv\")\r\n (Shape (Width + inf"
& ")\r\n (Border (Pen 2)\r\n (VBox\r\n (HBox \r\n "
& " (Shape (Width + inf) (ZMove (Text %urlDlgBanner \"Open URL ...\")))\r\n"
& " (ZGrow (Pixmap \"grow.pbm\")))\r\n (VBox\r\n "
& " (Rim (Pen 10)\r\n (Frame Lowered (BgColor \"VeryLightGray\""
& ")\r\n (TypeIn %urlTypein (FirstFocus TRUE) ExpandOnDemand)"
& "))\r\n (HBox \r\n (DefaultBtn urlButton \"Open\") \r"
& "\n (Btn urlHomeButton \"Home\") \r\n (CloseBtn \""
& "Cancel\"))\r\n (Glue 10))))))";
CONST E4 =
"P4\r\n16 16\r\n\377\376\200\002\200\002\207\302\217\342\237\362\237\362"
& "\237\362\237\362\237\362\217\342\207\302\200\002\200\002\377\376\000\000"
;
CONST E5 =
"P4\n16 16\n\210\210DD\"\"\021\021\210\210DD\"\"\021\021\210\210DD\"\"\021"
& "\021\210\210DD\"\"\021\021";
CONST E6 =
"(ZChild %helpDialog (At 0.1 0.9 0.1 0.9)\n (Insert \"macros.fv\")\n ("
& "Shape (Width + inf) (Height + inf)\n (Border\n (Pen 2)\n ("
& "VBox\n (HBox\n (Shape (Width + inf) (ZMove (Text \"Brow"
& "ser Help\")))\n (ZGrow (Pixmap \"grow.pbm\")))\n (VBox\n"
& " (Generic %helpText)\n (Bar)\n (Glue 10) \n "
& " (HBox (DefaultCloseBtn \"OK\"))\n (Glue 10))))))\n";
CONST E7 =
"P4\r\n11 8\r\n\000\000\000\000\377\340\177\300?\200\037\000\016\000\004"
& "\000";
CONST E8 =
"(ZChild %searchDialog\r\n (Insert \"macros.fv\")\r\n (Shape\r\n (W"
& "idth + inf)\r\n (Border (Pen 2)\r\n (VBox\r\n (HBox \r\n"
& " (Shape (Width + inf) \r\n (ZMove (Text \"Global Se"
& "arch\"))) \r\n (ZGrow (Pixmap \"grow.pbm\")))\r\n (VBox"
& "\r\n (Rim (Pen 10)\r\n (Frame Lowered (BgColor \"Ve"
& "ryLightGray\")\r\n (TypeIn %searchTypein FirstFocus Expand"
& "OnDemand)))\r\n (HBox\r\n (DefaultBtn searchSearchB"
& "utton \"Search\")\r\n (CloseBtn \"Cancel\"))\r\n (G"
& "lue 10))))))";
CONST E9 =
"(Filter\n (Insert \"macros.fv\")\n (Target %target\n (Stable \n "
& " (Border (Pen 2)\n (VBox %vBox\n (HBox\n "
& " (Button %iconize (Pixmap \"iconize.pbm\"))\n (Menu (S"
& "hape (Width 20) (Pixmap \"pulldown.pbm\"))\n (VBox\n "
& " (PopMButton (For urlDialog) (Text LeftAlign \"Open URL ..."
& "\"))\n (Filter (MButton %popTitlesButton (Text LeftAli"
& "gn \"Goto Page ...\")))\n (Filter (MButton %popRenameB"
& "utton \n (Text LeftAlign \"Rename Deck ...\")))\n "
& " (MButton %gatherButton (Text LeftAlign \"Gather Up\"))\n"
& " (Filter Dormant \n\t\t (MButton %indexButton (Text"
& " LeftAlign \"Make Link Index\")))\n (Filter (MButton %"
& "deleteButton (Text LeftAlign \"Delete Deck\")))\n Bar\n"
& " (Filter (MButton %reloadDocButton (Text LeftAlign \"R"
& "eload\")))\n (Filter (MButton %duplicateDocButton (Tex"
& "t LeftAlign \"Duplicate\")))\n (Filter (MButton %expan"
& "dDocButton (Text LeftAlign \"Expand One Level\")))))\n (S"
& "hape (Width + inf)\n (ZMove (Text %deckName LeftAlign \""
& "Deck Name\")))\n (Filter (Source %mergeSource \"Merge\"))\n"
& " (Shape (Width + 0) (Text %locText \"?/?\"))\n "
& " (Filter\n (HBox\n (Button %bottomButt"
& "on \"B\")\n (PageButton %prevButton (Back TRUE) (For t"
& "Split)\n (Pixmap \"leftArrow.pbm\"))))\n "
& " (Filter\n (HBox\n (PageButton %nextBu"
& "tton (For tSplit)\n (Pixmap \"rightArrow.pbm\"))\n "
& " (Button %topButton \"T\")))\n (ZGrow (Pixm"
& "ap \"grow.pbm\")))\n (Bar 2)\n (ZSplit \n "
& " (Shape (Width + Inf) (Height + Inf) \n (TSplit %tS"
& "plit (Circular FALSE)))\n (Insert \"Titles.fv\")\n "
& " (Insert \"OpenURL.fv\")\n (Insert \"Rename.fv\")))))"
& "))";
CONST E10 =
"P4\r\n16 16\r\n\377\376\200\002\200\002\207\302\217\342\237\362\237\362"
& "\237\362\237\362\237\362\217\342\207\302\200\002\200\002\377\376\000\000"
;
CONST E11 =
"(Shape\r\n (Insert \"macros.fv\")\r\n (MButton %button\r\n (HBox \r"
& "\n (Shape (Width + 0) (Pixmap %icon \"mapped.pbm\"))\r\n (Tex"
& "t %text LeftAlign \"xxxx\"))))";
CONST E12 =
"P4\r\n16 16\r\n\000\000\000\000\000\000\001\200\001\300\037\340\037\360"
& "\037\370\037\370\037\360\037\340\001\300\001\200\000\000\000\000\000\000"
;
CONST E13 =
"(Shape (Width 600 + inf - 350) (Height 400 + inf - 100)\n (Insert \"ma"
& "cros.fv\")\n (VBox\n (HBox\n (Menu\n (Shape (Width 60)\n"
& " (HBox\n Fill\n (Shape (Width + 0) (HBox"
& " \"File\" (Pixmap \"menuArrow.pbm\")))\n Fill))\n (VB"
& "ox\n (MButton %newDeckButton (Text LeftAlign \"New Deck\"))\n "
& " Bar\n (MButton %flushCache (Text LeftAlign \"Flush Ca"
& "che\"))\n (MButton %caching (Text %cachingText LeftAlign \"Dis"
& "able or Enable Caching\"))\n (MButton %fgImages (Text %fgImag"
& "esText LeftAlign \"Bg or Fg Images\"))\n (MButton %zippers (Te"
& "xt %zippersText LeftAlign \"Disable or Enable Zippers\"))\n Ba"
& "r\n (MButton %debug (Text LeftAlign \"Debug\"))\n Bar"
& "\n (PopMButton (For searchDialog) (Text LeftAlign \"Search ..."
& "\"))\n (PopMButton (For helpDialog) (Text LeftAlign \"Help ..."
& "\"))\n (MButton %quitButton (Text LeftAlign \"Quit\"))))\n "
& " (Menu\n (Shape (Width 60)\n (HBox\n Fill\n"
& " (Shape (Width + 0) (HBox \"Decks\" (Pixmap \"menuArrow.pbm\""
& ")))\n Fill))\n (VBox (VBox %permanentDeckMenuVBox) Ba"
& "r (VBox %deckMenuVBox)))\n Fill)\n Bar\n (ZSplit %zSplit \n "
& " (Color \"Black\") \n (BgColor \"LightGray\")\n (Li"
& "ghtShadow \"White\")\n (ZBackground (Target %target (BgColor \"Whi"
& "te\") \"\"))\n (Insert \"Help.fv\")\n (Insert \"Search.fv\"))"
& "))";
CONST E14 =
"(ZChild Open\n (Insert \"macros.fv\")\n (Stable (Border (Pen 2)\n "
& " (VBox %vBox\n (HBox\n (Button %iconize (Pixmap \"icon"
& "ize.pbm\"))\n (Menu\n (Shape (Width 20) (Pixmap \"p"
& "ulldown.pbm\"))\n (VBox\n (MButton %backButton "
& "(Text LeftAlign \"Back To Deck\"))\n (MButton %newButton ("
& "Text LeftAlign \"Make New Deck\"))\n Bar\n (M"
& "Button %reloadDocButton (Text LeftAlign \"Reload\"))\n (MB"
& "utton %duplicateDocButton (Text LeftAlign \"Duplicate\"))\n "
& " (MButton %expandDocButton (Text LeftAlign \"Expand One Level\"))))\n "
& " (Shape (Width + Inf)\n (ZMove (HBox \n "
& " (Texture %freeDocPreName \"NWDiagonal\") \n (Shape "
& "(Width + 0) (Text %freeDocName LeftAlign \"FreeDoc\'s Name\"))\n "
& " (Texture %freeDocPostName \"NEDiagonal\"))))\n (ZGro"
& "w (Pixmap \"grow.pbm\")))\n (Bar 2)\n (Shape (Width + Inf"
& " - Inf) (Height + Inf - Inf) (Generic %gen))))))\n";
CONST E15 =
"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\000\000\000\000\000\000"
;
CONST E16 =
"(ZChild %renameDialog\r\n (Insert \"macros.fv\")\r\n (Shape (Width + "
& "inf)\r\n (Border (Pen 2)\r\n (VBox\r\n (HBox \r\n "
& " (Shape (Width + inf) (ZMove (Text %renameDlgBanner \"Rename deck .."
& ".\")))\r\n (ZGrow (Pixmap \"grow.pbm\")))\r\n (VBox\r\n"
& " (Rim (Pen 10)\r\n (Frame Lowered (BgColor \"VeryLi"
& "ghtGray\")\r\n (TypeIn %renameTypein (FirstFocus TRUE) Exp"
& "andOnDemand)))\r\n (HBox\r\n (DefaultBtn renameButt"
& "on \"Rename\") \r\n (CloseBtn \"Cancel\"))\r\n (Glu"
& "e 10))))))";
CONST E17 =
"#| FormsVBT macros |#\r\n#|============================================"
& "================================|#\r\n\r\n(LabelFont (Family \"helvetic"
& "a\") (WeightName \"bold\") (Width \"*\") (PointSize 120)) \r\n #| Use"
& "d for static text, including buttons and menus |#\r\n\r\n(Macro NoStret"
& "ch BOA (item)\r\n `(Shape (Width + 0) ,item))\r\n\r\n(Macro DefaultBt"
& "n BOA (name label)\r\n `(HBox (Glue 10 + Inf) (Shape (Width 60) \r\n "
& " (Border (Button %,name ,label))) (Glue 10 + Inf)))\r\n\r\n(Macro B"
& "tn BOA (name label)\r\n `(HBox (Glue 10 + Inf) (Shape (Width 60) \r\n"
& " (Rim (Button %,name ,label))) (Glue 10 + Inf)))\r\n\r\n(Macro Clo"
& "seBtn BOA (label)\r\n `(HBox (Glue 10 + Inf) (Shape (Width 60) \r\n "
& " (Rim (CloseButton ,label))) (Glue 10 + Inf)))\r\n\r\n(Macro Default"
& "CloseBtn BOA (label)\r\n `(HBox (Glue 10 + Inf) (Shape (Width 60) \r\n"
& " (Border (CloseButton ,label))) (Glue 10 + Inf)))\r\n\r\n";
CONST E18 =
"P4\n16 16\n\021\021\"\"DD\210\210\021\021\"\"DD\210\210\021\021\"\"DD\210"
& "\210\021\021\"\"DD\210\210";
CONST E19 =
"<HTML>\r\n<BODY>\r\n<H1>DeckScape Help</H1>\r\n\r\nThe DeckScape displa"
& "y contains two areas: a menubar with entries\r\n<B>File</B> and <B>Deck"
& "s</B>, and a workspace area. The workspace area\r\ninitially contains o"
& "ne deck. When you click on the blue links in a\r\ndocument, the link is"
& " fetched and the new document is displayed on the\r\ndeck. As you inte"
& "ract in DeckScape, the workspace will become\r\npopulated with multiple"
& " decks, pages that have been \"torn off\" decks,\r\nand a variety of di"
& "alog boxes.\r\n\r\n<H2>The File menu</H2>\r\n\r\nThe <B>New Deck</B> co"
& "mmand creates a new deck, initially displaying\r\nyour home page (the v"
& "alue of the environment variable\r\n<CODE>WWW_HOME</CODE>).<P>\r\n\r\nT"
& "he <B>Search...</B> command brings up a dialog that allows you to searc"
& "h\r\nfor a text string in all documents you\'ve viewed while running\r\n"
& "DeckScape. Those documents which contain hits are copied into a new\r\n"
& "deck.<P>\r\n\r\nThe <B>Help...</B> command brings up this help window.<"
& "P>\r\n\r\nThe <B>Quit</B> command exits DeckScape and saves the current"
& " list of\r\npages in each deck into the file $HOME/.deckscape.<P>\r\n\r"
& "\n\r\n<H2>The Decks menu</H2>\r\n\r\nThe entries in this menu are the n"
& "ames of decks. Selecting a deck will\r\nbring it to the top of the wind"
& "ows in the workspace. The name of the\r\ndeck is prefixed by a <em>clos"
& "ed</em> icon, then the deck will be\r\nopened and then brought to the t"
& "op.\r\n\r\n<P>\r\n\r\nThe first two entries in this menu are <B>HotList"
& "</B> and <B>Global History</B>.\r\nThese decks are provided autmoatical"
& "ly by DeckScape and cannot be deleted. (The\r\nglobal history is curren"
& "tly not implemented, however.)\r\n\r\n\r\n<H2>Manipulating Decks</H2>\r"
& "\n\r\nThe top banner line of the deck is used to manipulate the deck. "
& "Close\r\nthe deck using the close icon at the left. The downward pointi"
& "ng\r\ntriangle next to the close icon is the base of a pulldown menu of"
& " deck\r\ncommands. Reposition the deck by dragging the title. Merge the"
& "\r\ncontents of a deck by drag-and-dropping the <B>Merge</B> button ont"
& "o\r\nanother deck. Leaf through the content";
CONST E19_0 =
"s of a deck using the left and\r\nright arrow buttons, and go to the bo"
& "ttom or top of the deck with the\r\n\"B\" and \"T\" buttons. Resize the"
& " deck using the resize box in the upper\r\nright.<P>\r\n\r\nThe second "
& "banner line displays the URL of the document at the top of\r\nthe deck."
& " The \"H\" button copies to the top document to the hotlist\r\n(i.e., "
& "the deck whose name is \"HotList\"), and the \"D\" button deletes\r\nth"
& "e document from the deck. You can \"tear off\" a page by\r\ndrag-and-dr"
& "opping its URL banner into the background of the workspace,\r\nand you "
& "can move a page into a different deck by dropping its URL\r\nbanner int"
& "o the other deck.\r\n\r\n<H3>The Deck menu </H3>\r\n\r\n<p>\"Open URL.."
& ".\" pops up a dialog in which you may enter a URL. The document at tha"
& "t URL is placed in the deck.\r\n\r\n<p>\"Goto Page...\" displays a brow"
& "ser with the titles of all pages in the deck,\r\nand allows you to caus"
& "e the deck to display a selected page.\r\n\r\n<p>\"Rename Deck\" pops u"
& "p a dialog in which you my enter a new name for the deck.\r\n\r\n<p>\"G"
& "ather Up\" gathers all the deck\'s \"tear-off\" documents back into the"
& " deck.\r\n\r\n<p>\"Delete Deck\" deletes the deck.\r\n\r\n\r\n<p>\"Relo"
& "ad\" refetches the displayed document, bypassing any and all caches.\r\n"
& "\r\n<p>\"Duplicate\" makes a duplicate copy of the displayed document, "
& "and inserts the duplicate into the deck.\r\n\r\n<p>\"Expand One Level\""
& " makes a new deck containing the documents generated by following all o"
& "f the links in the displayed document.\r\nThis command is quite cool. T"
& "he pages will appear without images; just reload the page to get the im"
& "age.\r\n\r\n\r\n<H3>The Tear-Off Page menu</H3>\r\n\r\n<p>\"Back To Dec"
& "k\" sends the displayed document back to its home deck.\r\n\r\n<p>\"Mak"
& "e New Deck\" makes a new deck from the displayed document.\r\n\r\n<p>\""
& "Reload\", \"Duplicate\", and \"Expand One Level\" are the same as a\r\n"
& "page that is not torn off.\r\n\r\n</BODY>\r\n";
CONST E20 =
"P1\r\n# pulldown.pbm\r\n11 12\r\n0 0 0 0 0 0 0 0 0 0 0\r\n0 1 1 1 1 1 1"
& " 1 1 1 0\r\n0 1 1 1 1 1 1 1 1 1 0\r\n0 0 1 1 1 1 1 1 1 0 0\r\n0 0 1 1 1"
& " 1 1 1 1 0 0\r\n0 0 0 1 1 1 1 1 0 0 0\r\n0 0 0 1 1 1 1 1 0 0 0\r\n0 0 0"
& " 0 1 1 1 0 0 0 0\r\n0 0 0 0 1 1 1 0 0 0 0\r\n0 0 0 0 0 1 0 0 0 0 0\r\n0"
& " 0 0 0 0 1 0 0 0 0 0\r\n0 0 0 0 0 0 0 0 0 0 0\r\n";
BEGIN
END MyBundle.