/*
**      Newton Developer Technical Support Sample Code
**
**      Monaco Test v4, A monospaced font for the Newton
**
**      by Bob Ebert & J. Christopher Bell, Newton Developer Technical Support
**
**      Copyright © 1994-5 by Apple Computer, Inc.  All rights reserved.
**
**      You may incorporate this sample code into your applications without
**      restriction.  This sample code has been provided "AS IS" and the
**      responsibility for its operation is 100% yours.  You are not
**      permitted to modify and redistribute the source as "DTS Sample Code."
**      If you are going to re-distribute the source, we require that you
**      make it clear in the source that the code was descended from
**      Apple-provided sample code, but that you've made changes.
*/

// declare some useful constants

constant kMonaco9Plain := '{family: Monaco, size: 9, face: 0};
constant kBorderFormat := '|borderFormat:MonacoTest:PIEDTS| ;


// run at application install time
// setup stuff the app may need before it is ever opened
// or opened for this restart :-)
InstallScript := func(partFrame)
begin
   local myApp := partFrame.theForm ;

   // put my routing frame in the global routing frame
   routing.(kAppSymbol) := myApp.myRoutingFrame ;

   // put my format in the root so it can be found
   GetRoot().(kBorderFormat) := BuildContext(myApp.myPrintFormat);
end;


// run when application and/or card with app removed
// cleanup routing stuff
RemoveScript := func(packageFrame)
begin
   // get rid of entry in global routing frame
   RemoveSlot(routing, kAppSymbol);

   // remove my print format
   RemoveSlot(GetRoot(), kBorderFormat);
end;