// Text of project AdjustoButton written on 11/20/95 at 5:49 PM
// Beginning of file protoResizeApp

// Before Script for "_userproto000"
// Copyright, © 1994 Apple Computer. All rights reserved.


_userproto000 :=
    {maxAppWidth: 240,
     maxAppHeight: 336,
     viewSetupFormScript:
       func()
       begin
       	local l := getAppParams();
       	viewBounds := RelBounds(l.appAreaLeft, l.appAreaTop,
       		MIN(l.appAreaWidth, maxAppWidth),
       		MIN(l.appAreaHeight, maxAppHeight)) ;
       end,
     _proto: @157
    };


constant |layout_protoResizeApp| := _userproto000;
// End of file protoResizeApp
// Beginning of file protoAdjustoButton

// Before Script for "_userproto001"
// Copyright, © 1994 Apple Computer. All rights reserved.


_userproto001 :=
    {buttonHeight: 13,
     textSpacer: 8,
     viewSetupFormScript:
       func()
       begin
       	viewBounds := RelBounds(viewBounds.left, viewBounds.top,
       			 StrFontWidth(text, viewFont) + textSpacer, buttonHeight) ;
       end,
     viewChangedScript:
       func(slot, view)
       begin
       	inherited:?viewChangedScript(slot, view) ;
       	if slot = 'text then
       		:SyncView();			// SyncView causes the viewSetupFormScript to be called again,
       									// which sets the size based on the text.
       end,
     _proto: @226
    };


constant |layout_protoAdjustoButton| := _userproto001;
// End of file protoAdjustoButton
// Beginning of file protoAdjustoClusterButton

// Before Script for "_userproto002"
// Copyright, © 1994,1995 Apple Computer. All rights reserved.


_userproto002 :=
    {viewBounds: {left: 8, top: 2, right: 0, bottom: 0},
     viewJustify: 8389638,
     viewChangedScript:
       func(slot, view)
       begin
       	inherited:?viewChangedScript(slot, view) ;
       	if slot = 'text then
       		begin
       			:Parent():SyncChildren();
       			:Parent():Dirty();
       		end
       end,
     _proto: _userproto001
    };


constant |layout_protoAdjustoClusterButton| := _userproto002;
// End of file protoAdjustoClusterButton
// Beginning of file AdjustoButton.t

// Before Script for "_view000"
// Copyright © 1994 Apple Computer, Inc. All rights reserved.


_view000 :=
    {viewBounds: {top: 0, left: 0, right: 240, bottom: 336},
     title: "Adjusto Buttons",
     _proto: _userproto000
    };

Adjusto1 :=
    {viewFlags: 1,
     viewFormat: 336,
     viewBounds: {left: 4, top: 32, right: 235, bottom: 127},
     debug: "Adjusto1",
     viewClass: 74
    };
AddStepForm(_view000, Adjusto1);


// Before Script for "theText"
// Copyright, © 1994 Apple Computer. All rights reserved.


theText :=
    {viewBounds: {left: 2, top: 10, right: 229, bottom: 33},
     label: "Button String:",
     labelCommands:
       ["OK", "Cancel", "Only Three Words", "Suggestive Action Title"],
     text: "Some Initial Value",
     debug: "theText",
     _proto: @189
    };
AddStepForm(Adjusto1, theText);
StepDeclare(Adjusto1, theText, 'theText);



theButton :=
    {viewBounds: {left: 7, top: 71, right: 75, bottom: 83},
     text: "AdjustoButton",
     debug: "theButton",
     _proto: _userproto001
    };
AddStepForm(Adjusto1, theButton);
StepDeclare(Adjusto1, theButton, 'theButton);



_view001 :=
    {viewBounds: {left: 68, top: 40, right: 148, bottom: 52},
     text: "Update Button Text",
     buttonClickScript:
       func()
       begin
       	SetValue(theButton, 'text, theText.entryLine.text) ;
       end,
     _proto: _userproto001
    };
AddStepForm(Adjusto1, _view001);





_view002 :=
    {text: "Single Adjusto",
     viewBounds: {left: 12, top: 26, right: 88, bottom: 36},
     viewFormat: 1,
     viewJustify: 8388614,
     _proto: @218
    };
AddStepForm(_view000, _view002);



Adjusto2 :=
    {viewFlags: 1,
     viewFormat: 336,
     viewBounds: {left: 5, top: 141, right: 235, bottom: 303},
     debug: "Adjusto2",
     viewClass: 74
    };
AddStepForm(_view000, Adjusto2);

_view003 :=
    {viewFlags: 33,
     viewFormat: nil,
     viewBounds: {left: 0, top: 143, right: 232, bottom: 163},
     viewClass: 74
    };
AddStepForm(Adjusto2, _view003);

Button1 :=
    {text: "Button 1",
     viewBounds: {left: 4, top: 2, right: 0, bottom: 0},
     debug: "Button1",
     _proto: _userproto002
    };
AddStepForm(_view003, Button1);
StepDeclare(Adjusto2, Button1, 'Button1);



Button2 := {text: "Button 2", debug: "Button2", _proto: _userproto002};
AddStepForm(_view003, Button2);
StepDeclare(Adjusto2, Button2, 'Button2);



Button3 := {text: "Button 3", debug: "Button3", _proto: _userproto002};
AddStepForm(_view003, Button3);
StepDeclare(Adjusto2, Button3, 'Button3);






// Before Script for "Text1"
// Copyright, © 1994 Apple Computer. All rights reserved.


Text1 :=
    {viewBounds: {left: 4, top: 8, right: 228, bottom: 28},
     label: "Button 1 String:",
     labelCommands:
       ["OK", "Cancel", "Only Three Words", "Suggestive Action Title"],
     text: "Button 1",
     debug: "Text1",
     _proto: @189
    };
AddStepForm(Adjusto2, Text1);
StepDeclare(Adjusto2, Text1, 'Text1);



_view004 :=
    {viewBounds: {left: 6, top: 34, right: 86, bottom: 46},
     text: "Update Text 1",
     buttonClickScript:
       func()
       begin
       	SetValue(Button1, 'text, Text1.entryLine.text) ;
       end,
     _proto: _userproto001
    };
AddStepForm(Adjusto2, _view004);




// Before Script for "Text2"
// Copyright, © 1994 Apple Computer. All rights reserved.


Text2 :=
    {viewBounds: {left: 4, top: 52, right: 228, bottom: 72},
     label: "Button 2 String:",
     labelCommands:
       ["OK", "Cancel", "Only Three Words", "Suggestive Action Title"],
     text: "Button 2",
     debug: "Text2",
     _proto: @189
    };
AddStepForm(Adjusto2, Text2);
StepDeclare(Adjusto2, Text2, 'Text2);



_view005 :=
    {viewBounds: {left: 6, top: 78, right: 86, bottom: 90},
     text: "Update Text 2",
     buttonClickScript:
       func()
       begin
       	SetValue(Button2, 'text, Text2.entryLine.text) ;
       end,
     _proto: _userproto001
    };
AddStepForm(Adjusto2, _view005);




// Before Script for "Text3"
// Copyright, © 1994 Apple Computer. All rights reserved.


Text3 :=
    {viewBounds: {left: 4, top: 96, right: 232, bottom: 116},
     label: "Button 3 String:",
     labelCommands:
       ["OK", "Cancel", "Only Three Words", "Suggestive Action Title"],
     text: "Button 3",
     debug: "Text3",
     _proto: @189
    };
AddStepForm(Adjusto2, Text3);
StepDeclare(Adjusto2, Text3, 'Text3);



_view006 :=
    {viewBounds: {left: 6, top: 122, right: 86, bottom: 134},
     text: "Update Text 3",
     buttonClickScript:
       func()
       begin
       	SetValue(Button3, 'text, Text3.entryLine.text) ;
       end,
     _proto: _userproto001
    };
AddStepForm(Adjusto2, _view006);





_view007 :=
    {text: "Adjusto Cluster",
     viewBounds: {left: 13, top: 135, right: 104, bottom: 144},
     viewFormat: 1,
     viewJustify: 8388614,
     _proto: @218
    };
AddStepForm(_view000, _view007);




constant |layout_AdjustoButton.t| := _view000;
// End of file AdjustoButton.t



