ColorSchemeViewer.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Maureen Stone, November 30, 1985 1:31:14 pm PST
Pier, March 13, 1987 1:55:56 pm PST
DIRECTORY
ViewerClasses USING [Viewer],
Rope USING [ROPE],
Imager USING [Context, Color];
ColorSchemeViewer: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE = Rope.ROPE;
Viewer: TYPE = ViewerClasses.Viewer;
NotifyProc: TYPE = PROC [values: ARRAY [1..3] OF REAL, changes: Changes, client: REF];
The client will be Notified everytime a value in the viewer changes. The viewer will have been repainted to reflect the change by the time the notify proc is called.
Create: PROC [labels: ARRAY [1..3] OF ROPE, sw, sh: INT, notify: NotifyProc, title: ROPENIL, clientData: REFNIL, parent: Viewer ← NIL, wx, wy: INTEGER ← 0] RETURNS [Viewer];
SetValues: PROC [viewer: Viewer, values: ARRAY [1..3] OF REAL, notify: BOOLEANFALSE] RETURNS [Changes];
SetValues only paints the slider and text viewer contents, leaving the labels alone .
GetValues: PROC[viewer: Viewer] RETURNS[v1, v2, v3: REAL];
Changes: TYPE = {none, v1, v2, v3, allValues, paintViewer};
Paint: PROC[viewer: Viewer, context: Imager.Context, whatChanged: Changes];
SetSliderColors: PROC [viewer: Viewer, colors: ARRAY [1..3] OF Imager.Color];
For the red, green, blue colored sliders.
END.