ColorTrixDispatch.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Bloomenthal, January 16, 1987 11:52:03 pm PST
DIRECTORY ColorTrixBasics, Commander, ImagerPixelMap, Rope;
ColorTrixDispatch: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
CommandProc: TYPE ~ Commander.CommandProc;
DeviceRectangle: TYPE ~ ImagerPixelMap.DeviceRectangle;
PixelMap: TYPE ~ ColorTrixBasics.PixelMap;
PixelMapMisc: TYPE ~ ColorTrixBasics.PixelMapMisc;
Op: TYPE ~ RECORD [name: ROPE, proc: CommandProc, usage: ROPE];
Ops: TYPE ~ REF OpsSequence;
OpsSequence:
TYPE ~
RECORD [
length: NAT ← 0,
element: SEQUENCE maxLength: NAT OF Op
];
Color Trix Registry
RegisterCmOp:
PUBLIC
PROC [name:
ROPE, proc: CommandProc, usage:
ROPE];
Register a color map command proc with the Color Trix dispatcher.
RegisterCtOp:
PUBLIC
PROC [name:
ROPE, proc: CommandProc, usage:
ROPE];
Register a color trix command proc with the Color Trix dispatcher.
GetCmOp:
PUBLIC
PROC [name:
ROPE]
RETURNS [Op];
Return the named color trix map op.
GetCtOp:
PUBLIC
PROC [name:
ROPE]
RETURNS [Op];
Return the named color trix op.
Dispatcher
ColorTrixDispatch:
PUBLIC CommandProc;
Parse the command line and dispatch the command.
Window Support
GetWindow:
PUBLIC PROC [cmd: Commander.Handle, pm: PixelMap]
RETURNS [window: DeviceRectangle];
Search for -w switch with arguments.
GetWindowedPm:
PUBLIC
PROC [cmd: Commander.Handle]
RETURNS [pm: PixelMap];
Return the color display pixel map windowed according to any -w switch with arguments.
GetWindowedPmMisc:
PUBLIC PROC [cmd: Commander.Handle]
RETURNS [pmMisc: PixelMapMisc];
As above but for PixelMapMisc.
SetGlobalWindow:
PUBLIC PROC [window: DeviceRectangle];
Set the global window.
GetGlobalWindow:
PUBLIC
PROC
RETURNS [DeviceRectangle];
Return the global window.
GetInitialWindow:
PUBLIC
PROC
RETURNS [DeviceRectangle];
Return the default global window.
END.