AtomButtonsTypes.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on February 20, 1987 5:11:54 pm PST
Contents: Types for AtomButtons and Graphics Buttons.
DIRECTORY
Buttons, Imager, Rope, TiogaButtons, ViewerClasses;
AtomButtonsTypes: CEDAR DEFINITIONS =
BEGIN
Viewer: TYPE = ViewerClasses.Viewer;
Feedback Types
FeedbackData: TYPE = REF FeedbackDataObj;
FeedbackDataObj: TYPE = RECORD [
label: Viewer,
atomName: ATOM
];
Graphics Button Types
GBChoiceList: TYPE = LIST OF GraphicsButtonChoice;
GraphicsButtonChoice: TYPE = RECORD [
event: LIST OF REF ANY
];
UpdateGraphicsButtonProc: TYPE = PROC [clientData: REF ANY, stateInfo: GraphicsState];
RepaintProc: TYPE = PROC [dc: Imager.Context, clientData: REF ANY, buttonData: REF ANY, button: Viewer];
GraphicsState: TYPE = REF GraphicsStateObj;
GraphicsStateObj: TYPE = RECORD [
button: Viewer ← NIL,
clientData: REF ANY,
buttonData: REF ANY,
atom: ATOM,
repaintProc: RepaintProc,
handleProc: HandleButtonProc,
choices: GBChoiceList
];
Viewers Button Types
HandleButtonProc: TYPE = PROC [clientData: REF ANY, event: LIST OF REF ANY];
InitButtonProc: TYPE = PROC [name: Rope.ROPE, clientData: REF ANY, button: Viewer];
ConfirmProc: TYPE = PROC [clientData: REF ANY];
Two State (On/Off) Button Types
StateType: TYPE = {off, on};
TwoState: TYPE = REF TwoStateObj;
TwoStateObj: TYPE = RECORD [button: Buttons.Button ← NIL, state: StateType ← off, action: LIST OF REF ANY, clientData: REF ANY, handleProc: HandleButtonProc];
Enumerated Type Button Types
ButtonList: TYPE = LIST OF Rope.ROPE;
EnumTypeRef: TYPE = REF EnumTypeRec;
EnumTypeRec: TYPE = RECORD [
atom: ATOM,
namesOfButtons: ButtonList ← NIL, -- list of names of buttons in this Enumerated type
nextx: CARDINAL, -- next x position in container that client may begin displaying info so that it wont overwrite the buttons
nexty: CARDINAL, -- similar to nextx
type: DisplayStyle,
buttonOn: Buttons.Button ← NIL, -- the button currently on for a given enumerated type
flipLabel: Viewer ← NIL, -- points to the Viewer to re-label
clientData: REF ANYNIL, -- optional data provided by the client and used when the selection notifier procedure is called
handleProc: HandleButtonProc
];
StyleChoice: TYPE = {menuSelection, flipThru};
DisplayStyle: TYPE = {menuStyle, flipThruWithTitle, flipThruNoTitle};
ScalarButtonHandle: TYPE = REF ScalarButtonHandleObj;
ScalarButtonHandleObj: TYPE = RECORD [viewer: Viewer, headerButton: TiogaButtons.TiogaButton, scalarButtons: ScalarButtonClient, handleProc: HandleButtonProc];
ScalarButtonClient: TYPE = REF ScalarButtonClientObj;
ScalarButtonClientObj: TYPE = RECORD [button: TiogaButtons.TiogaButton, name: Rope.ROPE, value: REAL, action: LIST OF REF ANY, on: BOOL, next: ScalarButtonClient, clientData: REF ANY, handleProc: HandleButtonProc];
END.