<> <> <> <> <<>> DIRECTORY Buttons, Imager, Rope, TiogaButtons, ViewerClasses; AtomButtonsTypes: CEDAR DEFINITIONS = BEGIN Viewer: TYPE = ViewerClasses.Viewer; <> 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 ]; <> HandleButtonProc: TYPE = PROC [clientData: REF ANY, event: LIST OF REF ANY]; InitButtonProc: TYPE = PROC [name: Rope.ROPE, clientData: REF ANY, button: Viewer]; InitTwoStateProc: TYPE = PROC [name: Rope.ROPE, clientData: REF ANY, twoState: TwoState]; ConfirmProc: TYPE = PROC [clientData: REF ANY]; <> StateType: TYPE = {off, on}; TwoState: TYPE = REF TwoStateObj; TwoStateObj: TYPE = RECORD [button: Buttons.Button ¬ NIL, on: BOOL ¬ FALSE, event: LIST OF REF ANY, clientData: REF ANY, handleProc: HandleButtonProc]; <<>> <> 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 ANY ¬ NIL, -- 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}; Event: TYPE = LIST OF REF ANY; SortedButtonHandle: TYPE = REF SortedButtonHandleObj; SortedButtonHandleObj: TYPE = RECORD [viewer: Viewer, headerButton: TiogaButtons.TiogaButton, sortedButtons: REF ANY, handleProc: HandleButtonProc]; <> SortedButtonClient: TYPE = REF SortedButtonClientObj; SortedButtonClientObj: TYPE = RECORD [button: TiogaButtons.TiogaButton, name: Rope.ROPE, value: REF ANY, events: LIST OF Event, on: BOOL, next: SortedButtonClient, clientData: REF ANY, handleProc: HandleButtonProc]; ScalarButtonClient: TYPE = REF ScalarButtonClientObj; ScalarButtonClientObj: TYPE = RECORD [button: TiogaButtons.TiogaButton, name: Rope.ROPE, value: REAL, events: LIST OF Event, on: BOOL, next: ScalarButtonClient, clientData: REF ANY, handleProc: HandleButtonProc]; END.