// Text of project ButtnBar written on 5/14/95 at 11:59 AM // Beginning of file ButtnBar.t // Before Script for "myBase" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. myBase := {viewFlags: 4, viewFormat: 593, viewBounds: {top: 0, left: 0, right: 240, bottom: 336}, declareSelf: 'base, title: "Button Status", viewSetupFormScript: func() begin local b := GetAppParams(); constant kMaxWidth := 240; constant kMaxHeight := 336; self.viewBounds := RelBounds(b.appAreaLeft, b.appAreaTop, MIN(b.appAreaWidth, kMaxWidth), MIN(b.appAreaHeight, kMaxHeight)); // Global Routing frame routing.(kAppSymbol) := '{nothing: {title: "Do Nothing", routeScript: DoNothingScript}}; self.targetView := self ; end, target: nil // This would be your target for the Filing button... // Normally it would be a soup entry. , DoNothingScript: func(target, targetView) begin SetValue(theText, 'text, "Routing nothing chosen") ; end, viewQuitScript: func() begin RemoveSlot(routing, kAppSymbol) ; RemoveSlot(self, 'targetView) ; end, appSymbol: kAppSymbol, debug: "myBase", viewClass: 74 }; // Before Script for "_view000" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view000 := {_proto: @219}; AddStepForm(myBase, _view000); // Before Script for "_view001" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view001 := {_proto: @209}; AddStepForm(_view000, _view001); // Before Script for "_view002" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view002 := {viewBounds: {left: -23, top: 2, right: -6, bottom: 15}, _proto: @176}; AddStepForm(_view000, _view002); // Before Script for "button1" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. button1 := {text: "App 1", buttonClickScript: func() begin SetValue(theText, 'text, "Pushed App Button 1"); end, viewBounds: {left: 33, top: 3, right: 70, bottom: 15}, debug: "button1", _proto: @226 }; AddStepForm(_view000, button1); // After Script for "button1" thisView := button1; // set the bounds of the button so that it is to the right // of the clock and the correct height for the status bar // NOTE: this is the first button, so argument to the // ButtonBounds function MUST be negative thisView.viewBounds := ButtonBounds(-(thisView.viewBounds.right - thisView.viewBounds.left)); // Before Script for "button2" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. button2 := {text: "App 2", buttonClickScript: func() begin SetValue(theText, 'text, "Pushed App Button 2"); end, viewBounds: {left: 77, top: 3, right: 114, bottom: 15}, viewJustify: 8389638, debug: "button2", _proto: @226 }; AddStepForm(_view000, button2); // After Script for "button2" thisView := button2; // set the bounds of the button so that it is to the right // of the clock and the correct height for the status bar // NOTE, since not first button, argument to ButtonBounds // is positive. thisView.viewBounds := ButtonBounds(thisView.viewBounds.right - thisView.viewBounds.left); // Before Script for "button3" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. button3 := {text: "App 3", buttonClickScript: func() begin SetValue(theText, 'text, "Pushed App Button 3"); end, viewBounds: {left: 122, top: 3, right: 159, bottom: 15}, viewJustify: 8389638, debug: "button3", _proto: @226 }; AddStepForm(_view000, button3); // After Script for "button3" thisView := button3; // set the bounds of the button so that it is to the right // of the clock and the correct height for the status bar // NOTE, since not first button, argument to ButtonBounds // is positive. thisView.viewBounds := ButtonBounds(thisView.viewBounds.right - thisView.viewBounds.left); // Before Script for "_view003" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view003 := {viewBounds: {left: -2, top: 3, right: 56, bottom: 21}, _proto: @229}; AddStepForm(myBase, _view003); // Before Script for "theText" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. theText := {text: "Click and App Button", viewBounds: {left: 5, top: 62, right: 244, bottom: 110}, viewFont: fancyFont18+tsBold, viewJustify: 6, debug: "theText", _proto: @218 }; AddStepForm(myBase, theText); StepDeclare(myBase, theText, 'theText); constant |layout_ButtnBar.t| := myBase; // End of file ButtnBar.t