<> <> <> <> <> <> <> <<>> DIRECTORY AtomButtonsTypes, Basics, Buttons, Imager, Menus, PopUpButtons, Rope, TiogaButtons, ViewerClasses; AtomButtons: CEDAR DEFINITIONS = BEGIN ConfirmProc: TYPE = AtomButtonsTypes.ConfirmProc; Event: TYPE = AtomButtonsTypes.Event; HandleButtonProc: TYPE = AtomButtonsTypes.HandleButtonProc; InitButtonProc: TYPE = AtomButtonsTypes.InitButtonProc; InitTwoStateProc: TYPE = AtomButtonsTypes.InitTwoStateProc; SortedButtonClient: TYPE = AtomButtonsTypes.SortedButtonClient; SortedButtonHandle: TYPE = AtomButtonsTypes.SortedButtonHandle; TwoState: TYPE = AtomButtonsTypes.TwoState; UpdateProc: TYPE = AtomButtonsTypes.InitButtonProc; Viewer: TYPE = ViewerClasses.Viewer; <> <<>> ButtonType: TYPE = {button, label, text, popUpButton, twoState}; PopUpChoices: TYPE = LIST OF PopUpChoice; PopUpChoice: TYPE = RECORD [action: LIST OF REF ANY, actionImage: Rope.ROPE, doc: Rope.ROPE, font: Imager.Font ¬ NIL]; <> ButtonLineEntry: TYPE = RECORD [ SELECT type: ButtonType FROM button => [name: Rope.ROPE, events: LIST OF Event, wxRelative: INTEGER ¬ -1, border: BOOL ¬ FALSE, font: Imager.Font ¬ NIL, confirmProc: ConfirmProc ¬ NIL, initProc: InitButtonProc ¬ NIL, ww: NAT ¬ 0], popUpButton => [name: Rope.ROPE, choices: PopUpChoices, wxRelative: INTEGER ¬ -1, border: BOOL ¬ FALSE, font: Imager.Font ¬ NIL, help: PopUpButtons.Help, disableDecoding: BOOL ¬ FALSE, headMenu: BOOL ¬ TRUE, confirmProc: ConfirmProc ¬ NIL, initProc: InitButtonProc ¬ NIL, ww: NAT ¬ 0], label => [name: Rope.ROPE, initProc: InitButtonProc ¬ NIL, ww: NAT ¬ 0, wxRelative: INTEGER ¬ -1, border: BOOL ¬ FALSE, font: Imager.Font ¬ NIL], text => [name: Rope.ROPE, initProc: InitButtonProc ¬ NIL, ww: NAT ¬ 0, wxRelative: INTEGER ¬ -1, border: BOOL ¬ FALSE, font: Imager.Font ¬ NIL], twoState => [name: Rope.ROPE, event: LIST OF REF ANY, on: BOOL ¬ FALSE, initProc: InitTwoStateProc ¬ NIL, ww: NAT ¬ 0, wxRelative: INTEGER ¬ -1, border: BOOL ¬ TRUE, font: Imager.Font ¬ NIL] ENDCASE ]; <> BuildButtonLine: PROC [container: Viewer, x, y: NAT, clientData: REF ANY, handleProc: HandleButtonProc, entries: LIST OF ButtonLineEntry, horizontalSpace: INTEGER ¬ 2, lineHeight: INTEGER ¬ 15] RETURNS [nextX: INTEGER]; <> <> <> <> <<>> SetBinaryState: PROC [twoState: TwoState, on: BOOL]; <> GetBinaryState: PROC [twoState: TwoState] RETURNS [on: BOOL]; SwitchBinaryState: PROC [handle: TwoState]; <> <> <<>> CreateSortedButtonViewer: PROC [container: Viewer, x, y: NAT, lineHeight: INTEGER ¬ 15] RETURNS [SortedButtonHandle]; <> SortedButtonEntry: TYPE = RECORD [name: Rope.ROPE, value: REF ANY, events: LIST OF Event, on: BOOL]; CompareProc: TYPE = PROC [aName: Rope.ROPE, aValue: REF ANY, bName: Rope.ROPE, bValue: REF ANY] RETURNS [compare: Basics.Comparison]; FindProc: TYPE = PROC [state: BOOL, name: Rope.ROPE, value: REF ANY, clientData: REF ANY] RETURNS [found: BOOL, done: BOOL ¬ FALSE]; ReadSortedProc: TYPE = PROC [state: BOOL, name: Rope.ROPE, value: REF ANY, clientData: REF ANY] RETURNS [done: BOOL ¬ FALSE]; WriteSortedProc: TYPE = PROC [state: BOOL, name: Rope.ROPE, value: REF ANY, clientData: REF ANY] RETURNS [newState: BOOL, newName: Rope.ROPE ¬ NIL, newValue: REF ANY, done: BOOL ¬ FALSE]; BuildSortedButtons: PROC [handle: SortedButtonHandle, clientData: REF ANY, handleProc: HandleButtonProc, header: Rope.ROPE, sortedButtonList: LIST OF SortedButtonEntry]; <> <<>> ReadSortedButtons: PROC [handle: SortedButtonHandle, readProc: ReadSortedProc, clientData: REF ANY ¬ NIL]; WriteSortedButtons: PROC [handle: SortedButtonHandle, writeProc: WriteSortedProc, clientData: REF ANY ¬ NIL]; AddSortedButton: PROC [clientData: REF ANY, handle: SortedButtonHandle, entry: SortedButtonEntry, compareProc: CompareProc] RETURNS [oldFoundButton: SortedButtonClient ¬ NIL]; DeleteSortedButtons: PROC [clientData: REF ANY, handle: SortedButtonHandle, findProc: FindProc]; <> ScalarButton: TYPE = RECORD [name: Rope.ROPE, value: REAL, events: LIST OF Event, on: BOOL]; << [Artwork node; type 'ArtworkInterpress on' to command tool] >> BuildScalarButtons: PROC [handle: SortedButtonHandle, clientData: REF ANY, handleProc: HandleButtonProc, header: Rope.ROPE, scalarButtonList: LIST OF ScalarButton]; <> Order: TYPE = {incr, decr}; SetAllScalarStates: PROC [clientData: REF ANY, handle: SortedButtonHandle, on: BOOL]; SetScalarState: PROC [clientData: REF ANY, handle: SortedButtonHandle, scalar: REAL, on: BOOL, epsilon: REAL ¬ 0.001]; GetScalarState: PROC [clientData: REF ANY, handle: SortedButtonHandle, scalar: REAL, epsilon: REAL ¬ 0.001] RETURNS [on: BOOL]; ToggleScalarState: PROC [clientData: REF ANY, handle: SortedButtonHandle, scalar: REAL, epsilon: REAL ¬ 0.001] RETURNS [newState: BOOL]; AddScalarSorted: PROC [clientData: REF ANY, handle: SortedButtonHandle, button: ScalarButton, order: Order ¬ incr] RETURNS [oldFoundButton: SortedButtonClient ¬ NIL]; <> RebuildScalarButtons: PROC [viewer: Viewer, headerButton: TiogaButtons.TiogaButton, clientData: REF ANY, handleProc: HandleButtonProc, scalarButtonList: LIST OF ScalarButton] RETURNS [buttons: SortedButtonClient]; <> EnumTypeRef: TYPE = AtomButtonsTypes.EnumTypeRef; ButtonList: TYPE = AtomButtonsTypes.ButtonList; StyleChoice: TYPE = AtomButtonsTypes.StyleChoice; DisplayStyle: TYPE = AtomButtonsTypes.DisplayStyle; BuildEnumTypeSelection: PROC [viewer: ViewerClasses.Viewer, x, y: NAT, maxWidth: NAT, clientData: REF ANY, handleProc: HandleButtonProc, title: Rope.ROPE, default: Rope.ROPE, borderOnButtons: BOOL, style: StyleChoice, allInOneRow: BOOL, buttonNames: ButtonList, atom: ATOM, horizontalSpace: INTEGER ¬ 2, lineHeight: INTEGER ¬ 15] RETURNS [EnumTypeRef]; TimeToFlipThru: PROC [event: LIST OF REF ANY]; <> HandlePopUpProc: TYPE = PROC [button: REF ANY, clientData: REF ANY, event: LIST OF REF ANY]; BuildPopUp: PROC [clientData: REF, handleProc: HandlePopUpProc, paint: PopUpButtons.PaintProc, inButton: PopUpButtons.InTestProc, entry: ButtonLineEntry, clientPackageName: Rope.ROPE] RETURNS [instance: REF]; <> <> UnQueuedButtonLineEntry: TYPE = RECORD [name: Rope.ROPE, type: ButtonType, clickProc: Menus.ClickProc, updateProc: UpdateProc ¬ NIL, ww: NAT ¬ 0, wxRelative: INTEGER ¬ -1, border: BOOL ¬ FALSE, confirmProc: ConfirmProc ¬ NIL, font: Imager.Font ¬ NIL]; BuildUnQueuedButtonLine: PROC [container: Viewer, x, y: NAT, clientData: REF ANY, entries: LIST OF UnQueuedButtonLineEntry, horizontalSpace: INTEGER ¬ 2, lineHeight: INTEGER ¬ 15] RETURNS [nextX: INTEGER]; <> END.