// ---- End Project Data ---- // ---- File Notarize.t ---- // Before Script for "top" // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved. top := {viewBounds: {left: 1, top: 94, right: 184, bottom: 253}, _proto: protoFloatNGo, debug: "top" }; // Before Script for "Notarize" // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved. Notarize := /* child of top */ {text: "Notarize", buttonClickScript: func() begin // setup an empty array for the data items in // the note local myData:=[]; // get the global bounds of the parent to use in // calculating the bounds of the data items in the note local baseBounds := base:GlobalBox(); local tempBounds ; // keep track of the maximum height of the note local maxHeight := 0 ; // now go through each item in the view and convert // it into a text (para) item in a note foreach thing in base:childviewframes() do if thing.text exists then begin tempBounds := :RelativeRect(baseBounds, thing:GlobalBox()) ; addArraySlot(myData,({viewStationery: 'para, // preserve the relative viewbounds by taking the // top, left of the parent (base) view as 0,0 viewBounds: tempBounds, // get the text text: thing.text, // keep the viewFont so it looks right viewFont: thing.viewFont, // copy over any styles or tabs (though none are used) styles: thing.styles, tabs: thing.tabs})); maxHeight := MAX(maxHeight, tempBounds.bottom); end ; // now create the note entry local myEntry:={viewStationery: 'paperRoll, height: maxHeight, data: myData, timeStamp:time(), modTime:time()}; // add the item to the notes soup GetUnionSoup(ROM_paperrollsoupname):AddToDefaultStore(myEntry); // tell the notepad to update itself BroadcastSoupChange(ROM_paperrollsoupname); end, viewBounds: {left: 83, top: 115, right: 163, bottom: 131}, viewFont: ROM_fontSystem14Bold, RelativeRect: // normalize the rectangle of a childview to its parent func(parentRect, childRect) begin local r := {top: childRect.top - parentRect.top, left: childRect.left - parentRect.left} ; r.bottom := r.top + (childRect.bottom - childRect.top) ; r.right := r.left + (childRect.right - childRect.left) ; r ; end, _proto: protoTextButton, debug: "Notarize" }; // Before Script for "_view000" // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved. _view000 := /* child of top */ {text: "So, it's some text - what do you think ?", viewBounds: {left: 9, top: 9, right: 169, bottom: 49}, viewJustify: 0, _proto: protoStaticText }; // Before Script for "_view001" // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved. _view001 := /* child of top */ { text: "Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard Hello Richard " , viewBounds: {left: 9, top: 57, right: 73, bottom: 145}, viewJustify: 0, viewFont: simpleFont9, _proto: protoStaticText }; // Before Script for "_view002" // Copyright © 1993, 1994 by Apple Computer, Inc. All rights reserved. _view002 := /* child of top */ {text: "In Box", viewBounds: {left: 89, top: 57, right: 145, bottom: 81}, _proto: protoStaticText }; // ---- Beginning of section for non used Layout files ---- // End of output