// Text of project Clock written on 11/20/95 at 5:51 PM
// Beginning of file Clock.t

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


_view000 :=
    {viewBounds: {left: 0, top: 0, right: 142, bottom: 88},
     viewJustify: 80,
     _proto: @180
    };


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


_view001 :=
    {text: "",
     viewBounds: {left: 0, top: 0, right: 0, bottom: 20},
     viewIdleScript:
       DefConst('kMyTimeSpec, GetDateStringSpec([[kElementHour, kFormatNumeric],
                                                [kElementMinute, kFormatNumeric]]));
       
       
       func()
       begin
          // hack out a value for seconds, since Time()
          // only returns minutes.
          local seconds := TimeInSeconds() mod 60 ;
          local secString := if seconds < 10 then "0" & seconds else NumberStr(seconds) ;
       
          // change my text
          SetValue(self, 'text, TimeStr(Time(), kMyTimeSpec) & ":" & secString) ;
       
          // call me again in 1 second
          1000;
       end,
     viewSetupDoneScript:
       func()
       begin
          // setup to call the viewIdleScript after 1 second,
          // and call the viewIdleScript to get an initial value.
          :SetupIdle(:viewIdleScript());
       end,
     viewFont: fancyFont18+tsBold,
     viewJustify: 8388726,
     viewSetupFormScript:
       func()
       begin
          viewBounds := Clone(viewBounds) ;
          viewbounds.bottom := fontHeight(viewFont);
       end,
     _proto: @218
    };
AddStepForm(_view000, _view001);




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


_view002 :=
    {title: "Clock!",
     viewBounds: {left: -4, top: 8, right: 68, bottom: 24},
     _proto: @229
    };
AddStepForm(_view000, _view002);




constant |layout_Clock.t| := _view000;
// End of file Clock.t



