File information: | |
File name: | WManSelection.mesa_Oct77.pdf [preview WManSelection.mesa Oct77] |
Size: | 228 kB |
Extension: | |
Mfg: | xerox |
Model: | WManSelection.mesa Oct77 🔎 |
Original: | WManSelection.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing WManSelection.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 26-02-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name WManSelection.mesa_Oct77.pdf WManSelection.mesa 25-0CT-11 15:24:43 Page 1 --File: WManSelection.mesa --Edited by Sandman October 1. 1911 9:20 AM DIRECTORY WindowDefs: FROM "windowdefs". StreamDefs: FROM "streamdefs". SystemDefs: FROM "systemdefs". MenuDefs: FROM "menudefs". RectangleDefs: FROM "rectangledefs", WManagerDefs: FROM "wmanagerdefs"; DEFINITIONS FROM StreamDefs. MenuDefs. WindowDefs. RectangleDefs. WManagerDefs; WManSelection: PROGRAM[WMState: WMDataHandle] IMPORTS WindowDefs, StreamDefs. SystemDefs. MenuDefs, RectangleDefs. WManagerDefs EXPORTS WManagerDefs SHARES StreamDefs. MenuDefs. WManagerDefs ~ BEGIN OPEN WMState; CR: CHARACTER = 15C: Space: CHARACTER = 40C: MenuSelect: PUBLIC PROCEDURE [w: WindowHandle. x: xCoord. y: yCoord]= BEGIN -- define locals index: INTEGER ~ -1; mapx: xCoord: mapy: yCoord; defaultmenu: DESCRIPTOR FOR ARRAY OF MenuItem = DESCRIPTOR[BASE[menuarray]. LENGTH[menuarray]]; -- check if a menu IF w.menu = NIL THEN w.menu ~ CreateMenu[defaultmenu]: -- paste it up there [mapx. mapy] ~ CursorToMapCoords[defaultmapdata. x. y]; mapy ~ MIN[mapy. MAX[O.(w.rectangle.bitmap.height) -(LENGTH[w.menu.array]*defaultlineheight+2)]]; DisplayMenu[w.menu. w.rectangle.bitmap. mapx. mapy]: -- while the button is down select menu items WHILE GetMouseButton[] = Blue DO -- convert to rectangle coords x ~ xcursorloct: y ~ ycursorloc t ; -- and see if in menu [x. y] ~ CursorToRectangleCoords[w.menu.rectangle. x. y]: IF x > a AND x <= w.menu.rectangle.cw AND y > a AND y <= w.menu.rectangle.ch THEN index ~ y/defaultlineheight ELSE index ~ -1: MarkMenu I tem[w. menu. index]; ENDLOOP: -- and restore menus region and contents underneath ClearMenu[w.menu]: -- see if command selected IF index # -1 THEN w. menu. arr aye index] . proc[w. x cursor 1oct. ycursor 1oct] ; END: TextSelect: PUBLIC PROCEDURE [w: WindowHandle. x: xCoord. y: yCoord]- BEGIN -- Declare locals line. width: INTEGER: xpos: xCoord: 5 a ve i nde x, i ndex: S t ream In dex: sel: POTNTrR TO Selection: exsel: POINTER TO Selection: Ir w.file H NIL THEN BfGIN -- first find character under the bug and then mark the selection sel ... SystemOefs.AllocatelieapNode[SI7f[Selection]]: exsel ... SystemDefs.AllocatelieapNode[SIZE[Select ion]]: WManSelection.mesa 25-0CT-77 15:24:43 Page 2 [line, xpos, width, index] ~ ResolveBugToPosition[w, x, y]: saveindex ~ index: sel1' ~ Selection[xpos, xpos+width, line, 1 ine, index, index]: MakeSe1ection[w, sell; check for extensions WHILE GetMouseButton[] = Red 00 IF x # xcursorloc1' OR y # ycursorloc1' THEN BEGIN x ~ xcursorloc1': y ~ ycursorloc1': [line. xpos. width |
Date | User | Rating | Comment |