G2dPopUpImpl.mesa
Copyright Ó 1987, 1992 by Xerox Corporation. All rights reserved.
Bloomenthal, July 1, 1992 7:02 pm PDT
DIRECTORY G2dPopUp, Rope, TEditSelection, TiogaMenuOps, ViewerClasses, ViewerOps;
G2dPopUpImpl: CEDAR PROGRAM
IMPORTS TEditSelection, TiogaMenuOps, ViewerOps
EXPORTS G2dPopUp
~ BEGIN
Help!!
doc: Rope.ROPE ¬ "/PCedar/Documentation/Graphics2dDoc.tioga";
Help: PUBLIC PROC [key: Rope.ROPE, column: ViewerClasses.Column ¬ right, top: BOOL ¬ TRUE]
~ {
v: ViewerClasses.Viewer ¬ ViewerOps.FindViewer[doc];
IF v # NIL
THEN {IF v.column # column THEN ViewerOps.ChangeColumn[v, column]}
ELSE {
v ¬ ViewerOps.CreateViewer[flavor: $Text, paint: FALSE, info: [iconic: TRUE, column: column, openHeight: 140]];
TiogaMenuOps.Load[viewer: v, fileName: doc];
};
TiogaMenuOps.DefaultMenus[v];
ViewerOps.SetOpenHeight[viewer: v, clientHeight: 140];
ViewerOps.OpenIcon[icon: v, bottom: FALSE, paint: FALSE]; -- must do Open before Top
IF top THEN ViewerOps.TopViewer[v, FALSE] ELSE ViewerOps.BottomViewer[v, FALSE];
ViewerOps.ComputeColumn[column];
[] ¬ TEditSelection.DoFind[viewer: v, rope: key, case: FALSE];
};
END.