// ---- End Project Data ---- // ---- File main.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 (empty is bad, but so what, it's a sample.) routing.(appSymbol) := {}; end, target: nil // This would be your target for the Filing button... // Normally it would be a soup entry., viewclass: 74, debug: "myBase" }; // Before Script for "_view000" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view000 := /* child of myBase */ {_proto: protoStatus}; // Before Script for "_view001" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view001 := /* child of _view000 */ {_proto: protoActionButton}; // Before Script for "_view002" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. _view002 := /* child of _view000 */ {viewBounds: {left: -23, top: 2, right: -6, bottom: 15}, _proto: protoFilingButton }; // Before Script for "button1" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. button1 := /* child of _view000 */ {text: "App 1", buttonClickScript: func() begin SetValue(theText, 'text, "Pushed App Button 1"); end, viewBounds: {left: 33, top: 3, right: 70, bottom: 15}, _proto: protoTextButton, debug: "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 := /* child of _view000 */ {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, _proto: protoTextButton, debug: "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 := /* child of _view000 */ {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, _proto: protoTextButton, debug: "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 := /* child of myBase */ {viewBounds: {left: -2, top: 3, right: 56, bottom: 21}, _proto: protoTitle}; // Before Script for "theText" // Copyright © 1993-4 by Apple Computer, Inc. All rights reserved. theText := /* child of myBase */ {text: "Click and App Button", viewBounds: {left: 5, top: 62, right: 244, bottom: 110}, viewFont: fancyFont18+tsBold, viewJustify: 6, _proto: protoStaticText, debug: "theText" }; // View theText is declared to myBase // ---- Beginning of section for non used Layout files ---- // End of output