KnobAttach.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Created Tuesday, August 7, 1984 2:44 pm PDT
Last edited by Eric Nickell, September 17, 1986 2:17:50 am PDT
DIRECTORY
Sliders USING [Slider, SliderProc],
ViewerClasses USING [Viewer, ViewerRec],
ViewerOps USING [DestroyViewer]
;
KnobAttach: CEDAR DEFINITIONS IMPORTS ViewerOps = BEGIN
KnobAttachViewer: TYPE ~ ViewerClasses.Viewer;
Slider: TYPE ~ Sliders.Slider;
Attachment: TYPE ~ {left, right, none};
NotASlider: ERROR;
TurnProc: TYPE ~ Sliders.SliderProc;
Create: PROC [info: ViewerClasses.ViewerRec, slider: Slider, turnProc: TurnProc ← NIL, clientData: REFNIL, paint: BOOLTRUE] RETURNS [KnobAttachViewer];
The slider passed to it is the one which it will control (i.e., support attachment to the hardware knobs).
See KnobDoc.tioga for information on how to use the hooks to UserProfile.
Destroy: PROC [viewer: KnobAttachViewer] ~ INLINE {ViewerOps.DestroyViewer[viewer]};
GetAttachment: PROC [viewer: KnobAttachViewer] RETURNS [Attachment];
Attach: PROC [viewer: KnobAttachViewer, whichKnob: Attachment, paint: BOOLTRUE];
Allows client to manually perform an attachment between a knob and a slider (for defaults, etc.)
Detach: PROC [viewer: KnobAttachViewer, paint: BOOLTRUE] ~ INLINE {Attach[viewer, none, paint]};
END.