// ---- End Project Data ---- // ---- File TabsNStyles.t ---- // Before Script for "baseView" // Copyright 1993-1994 Apple Computer, Inc. All rights reserved. baseView := {title: "TabsNStyles", viewBounds: {top: 0, left: 0, right: 240, bottom: 336}, viewSetupFormScript: func() begin local b := GetAppParams(); constant kMaxWidth := 240; constant kMaxHeight := 336; // prepare for different size screens viewBounds := RelBounds(b.appAreaLeft, b.appAreaTop, Min(b.appAreaWidth, kMaxWidth), Min(b.appAreaHeight, kMaxHeight) ); end, _proto: protoApp, debug: "baseView" }; title2 := /* child of baseView */ {text: "Styled Text Example:", viewBounds: {left: 10, top: 50, right: 173, bottom: 67}, _proto: protoStaticText, debug: "title2" }; theText := /* child of baseView */ {viewFlags: 3, viewFormat: 134427729, viewlinespacing: 18, viewFont: userFont12, viewBounds: {left: 17, top: 73, right: 228, bottom: 184}, text: "This is the story of a brave rat that tried to cross the street and forgot that the way people drive is not to exactly look at the ground closely while driving 80 mph..." , style1: {family: ROM_genevafont, face: 1, size: 12}, style2: {family: ROM_genevafont, face: 0, size: 12}, style3: {family: ROM_genevafont, face: 2, size: 12}, styles: nil, viewSetupFormScript: func() // mostly setup the style array begin // create Array in RAM styles := Array(0,nil); // set the style of the first two lines (56 chars) to bold geneva SetAdd(styles, 56, nil); SetAdd(styles, style1, nil); // set the style of the second two lines (62 chars) to plain geneva SetAdd(styles, 62, nil); SetAdd(styles, style2, nil); // finally set the last two lines to italic geneva SetAdd(styles, 70, nil); SetAdd(styles, style3, nil); // print the style array in inspector print(styles); end, tabs: [40, 80, 120,160], viewclass: 81, debug: "theText" }; _view000 := /* child of baseView */ {text: "Tab Example:", viewBounds: {left: 10, top: 218, right: 130, bottom: 234}, _proto: protoStaticText }; theText2 := /* child of baseView */ {viewFlags: 1, viewFormat: 12625, viewlinespacing: 20, viewFont: ROM_fontsystem10bold, viewBounds: {left: 11, top: 235, right: 233, bottom: 281}, tabs: [30, 60, 90, 120, 150, 180], text: "0\t1\t2\t3\t4\t5\t" & // use the backslash-t method for tabs "6 7 8 9 10 11 12 13 14 15" // or put tabs directly in the code, viewclass: 81, debug: "theText2" }; // ---- Beginning of section for non used Layout files ---- // End of output