// Text of project Cluster written on 11/21/95 at 2:29 PM // Beginning of file Cluster.t // Before Script for "baseView" // Copyright © 1993-1995 by Apple Computer, Inc. All rights reserved. nil baseView := {title: "Radio Cluster Example", viewBounds: {left: 2, top: 2, right: 242, bottom: 338}, 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)); end, debug: "baseView", _proto: @157 }; mainCluster := {viewBounds: {left: 44, top: 116, right: 196, bottom: 220}, viewFlags: 3, clusterChanged: func() begin theSelection:Hide(); // force transition effect (drawer) SetValue(theSelection, 'text, "Selected no" && clusterValue); theSelection:Show(); end, viewFormat: 67109456, viewJustify: 0, debug: "mainCluster", _proto: @203 }; AddStepForm(baseView, mainCluster); StepDeclare(baseView, mainCluster, 'mainCluster); radio1 := {buttonValue: 1, viewBounds: {left: 8, top: 16, right: 120, bottom: 32}, text: "Do this", debug: "radio1", _proto: @202 }; AddStepForm(mainCluster, radio1); radio2 := {buttonValue: 2, viewBounds: {left: 8, top: 40, right: 120, bottom: 56}, text: "Or This!", debug: "radio2", _proto: @202 }; AddStepForm(mainCluster, radio2); radio3 := {buttonValue: 3, viewBounds: {left: 8, top: 64, right: 120, bottom: 80}, text: "Or maybe this!", debug: "radio3", _proto: @202 }; AddStepForm(mainCluster, radio3); clusterLabel := {text: "The CLUSTER!!!", viewBounds: {left: 53, top: 109, right: 141, bottom: 125}, viewTransferMode: 0, debug: "clusterLabel", _proto: @218 }; AddStepForm(baseView, clusterLabel); selectLabel := {text: "User Selected:", viewBounds: {left: 34, top: 250, right: 114, bottom: 266}, debug: "selectLabel", _proto: @218 }; AddStepForm(baseView, selectLabel); TheSelection := {text: "Nothing yet\u2026", viewBounds: {left: 115, top: 250, right: 193, bottom: 262}, viewFormat: 33554768, viewEffect: 65144832, debug: "TheSelection", _proto: @218 }; AddStepForm(baseView, TheSelection); StepDeclare(baseView, TheSelection, 'TheSelection); info := {text: "This simple sample shows how radioclusters and radiobuttons work.", viewBounds: {left: 26, top: 26, right: 210, bottom: 74}, viewJustify: 0, debug: "info", _proto: @218 }; AddStepForm(baseView, info); constant |layout_Cluster.t| := baseView; // End of file Cluster.t