home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-07 | 6.4 KB | 293 lines | [TEXT/MPS ] |
-
- // ---- End Project Data ----
-
-
- // ---- File AdjustoButton.t ----
-
- // ---- 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: protoApp
- };
-
-
- // ---- Back in 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 := /* child of _view000 */
- {viewFlags: 1,
- viewFormat: 336,
- viewBounds: {left: 4, top: 32, right: 235, bottom: 127},
- viewclass: 74,
- debug: "Adjusto1"
- };
-
-
- // Before Script for "theText"
- // Copyright, © 1994 Apple Computer. All rights reserved.
-
- theText := /* child of Adjusto1 */
- {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",
- _proto: protoLabelInputLine,
- debug: "theText"
- };
- // View theText is declared to Adjusto1
-
-
-
-
- // ---- 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: protoTextButton
- };
-
-
- // ---- Back in File AdjustoButton.t ----
- theButton := /* child of Adjusto1 */
- {viewBounds: {left: 7, top: 71, right: 75, bottom: 83},
- text: "AdjustoButton",
- _proto: _userproto001,
- debug: "theButton"
- };
- // View theButton is declared to Adjusto1
-
-
-
- _view001 := /* child of Adjusto1 */
- {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
- };
-
-
-
-
-
- _view002 := /* child of _view000 */
- {text: "Single Adjusto",
- viewBounds: {left: 12, top: 26, right: 88, bottom: 36},
- viewFormat: 1,
- viewJustify: 8388614,
- _proto: protoStaticText
- };
-
-
-
- Adjusto2 := /* child of _view000 */
- {viewFlags: 1,
- viewFormat: 336,
- viewBounds: {left: 5, top: 141, right: 235, bottom: 303},
- viewclass: 74,
- debug: "Adjusto2"
- };
-
- _view003 := /* child of Adjusto2 */
- {viewFlags: 33,
- viewFormat: nil,
- viewBounds: {left: 0, top: 143, right: 232, bottom: 163},
- viewclass: 74
- };
-
-
- // ---- File protoAdjustoClusterButton ----
- _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
- };
-
-
- // ---- Back in File AdjustoButton.t ----
- Button1 := /* child of _view003 */
- {text: "Button 1",
- viewBounds: {left: 4, top: 2, right: 0, bottom: 0},
- _proto: _userproto002,
- debug: "Button1"
- };
- // View Button1 is declared to Adjusto2
-
-
-
- Button2 := /* child of _view003 */
- {text: "Button 2", _proto: _userproto002, debug: "Button2"};
- // View Button2 is declared to Adjusto2
-
-
-
- Button3 := /* child of _view003 */
- {text: "Button 3", _proto: _userproto002, debug: "Button3"};
- // View Button3 is declared to Adjusto2
-
-
-
-
-
-
- // Before Script for "Text1"
- // Copyright, © 1994 Apple Computer. All rights reserved.
-
- Text1 := /* child of Adjusto2 */
- {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",
- _proto: protoLabelInputLine,
- debug: "Text1"
- };
- // View Text1 is declared to Adjusto2
-
-
-
- _view004 := /* child of Adjusto2 */
- {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
- };
-
-
-
-
- // Before Script for "Text2"
- // Copyright, © 1994 Apple Computer. All rights reserved.
-
- Text2 := /* child of Adjusto2 */
- {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",
- _proto: protoLabelInputLine,
- debug: "Text2"
- };
- // View Text2 is declared to Adjusto2
-
-
-
- _view005 := /* child of Adjusto2 */
- {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
- };
-
-
-
-
- // Before Script for "Text3"
- // Copyright, © 1994 Apple Computer. All rights reserved.
-
- Text3 := /* child of Adjusto2 */
- {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",
- _proto: protoLabelInputLine,
- debug: "Text3"
- };
- // View Text3 is declared to Adjusto2
-
-
-
- _view006 := /* child of Adjusto2 */
- {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
- };
-
-
-
-
-
- _view007 := /* child of _view000 */
- {text: "Adjusto Cluster",
- viewBounds: {left: 13, top: 135, right: 104, bottom: 144},
- viewFormat: 1,
- viewJustify: 8388614,
- _proto: protoStaticText
- };
-
-
-
-
-
-
-
- // ---- Beginning of section for non used Layout files ----
-
- // End of output