-- File: SVArtworkUser.mesa
-- Last edited by Bier on December 18, 1982 1:42 am
-- Author: Eric Bier on March 22, 1983 2:03 pm
-- Contents: Viewer for Two dimensional artwork for mappings
DIRECTORY
Containers,
Graphics,
Menus,
Rope,
SV2d,
SVArtwork,
ViewerClasses;
SVArtworkUser: CEDAR DEFINITIONS =
BEGIN
Artwork: TYPE = SVArtwork.Artwork;
MouseButton: TYPE = Menus.MouseButton;
Point2d: TYPE = SV2d.Point2d;
Viewer: TYPE = ViewerClasses.Viewer;
ArtworkToolData: TYPE = REF ArtworkToolDataObj;
ArtworkToolDataObj: TYPE = RECORD [
outer: Containers.Container ← NIL,
height: CARDINAL ← 0,
mode: SurfaceType,
picture: Viewer ← NIL,
textSection: TextSectionData,
origin: Point2d,
scalar: REAL,
proc: PROC [dc: Graphics.Context],
artwork: Artwork];
TextSectionData: TYPE = RECORD [
scalar: Viewer ← NIL];
SurfaceType: TYPE = {off, tube};
-- INTERWINDOW COMMUNICATION
UpdateHeader: PROC [assemblyName: Rope.ROPE, sceneName: Rope.ROPE, artworkToolData: ArtworkToolData];
SetArtwork: PROC [artworkTool: Viewer, artwork: Artwork, sceneName: Rope.ROPE, assemblyName: Rope.ROPE];
RotateArtwork: PROC [artworkTool: Viewer, degrees: REAL];
NormalizeArtwork: PROC [artworkTool: Viewer];
-- PAINTER
Painter: PROC [proc: PROC [dc: Graphics.Context], artworkToolData: ArtworkToolData];
-- Menu Procs
ScalarSetPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
ScalarPrompt: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
MakeBands: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
DrawArtwork: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
PlaceOrigin: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton,
shift, control: BOOL];
CrossHairs: PROC [parent: REF ANY, clientData: REF ANY, mouseButton: MouseButton, shift, control: BOOL];
END.