home *** CD-ROM | disk | FTP | other *** search
/ Totally for Newton 10 / PDA10.toast / mac / Packages / Programming / 2.x / More Routing / Documentation < prev    next >
Encoding:
Text File  |  1997-03-14  |  2.4 KB  |  68 lines  |  [TEXT/R*ch]

  1. // Copyright (c) 1996-1997 Jeremy Wyld. All rights reserved.
  2. /* For best viewing pleasure set the font to: Courier 10pt with 3 space tabs
  3.  
  4.  
  5.     Project Overview
  6.     
  7.         This auto part adds items to the routing menu.  It overrides a method in root that may cease
  8.         to exist someday, thus possibly killing this hack.  Don't blame me!  Playing with undocumented
  9.         "features" isn't for the light-hearted.  Extra items can be added, or those I provide may be
  10.         yanked.  Read on to figure how to do it yourself.
  11.         
  12.         For question or comments, send mail to: wyld@newton.apple.com
  13.  
  14.  
  15.          Files
  16.  
  17.                 Graphics.f                Loads graphics used in the routing frames.
  18.  
  19.                 MiscFunctions.f        Contains the definition for general functions used in the
  20.                                             rest of the files.
  21.                                         
  22.                 RouteFrames.f            Defines the route frames to be added to the routing menu.
  23.                 
  24.                 GetRouteScripts.f        Definition for the "new" :GetRouteScripts().
  25.                 
  26.                 InstallScript.f        InstallScript() definition for this auto part.
  27.                 
  28.                 RemoveScript.f            RemoveScript() definition for this auto part.
  29.                 
  30.                 
  31.         Adding More
  32.         
  33.             In order to add more items to the routing menu, I've supplied a few compile time functions.
  34.             These include AddRouteFrame(), AddRouteItem(), AddOpenItem(), and AddSeparator().  Place
  35.             the calls to these functions in RouteFrames.f (this keeps them all together in one place).
  36.             
  37.             
  38.             AddRouteFrame()
  39.             
  40.                 This function takes one argument, the actual frame to be added to the routing menu.  For
  41.                 documentation on routing frames, see "NPG - Comm" page 2-49 and page 2-50.
  42.                         
  43.                         
  44.             AddRouteItem()
  45.             
  46.                 This function takes three arguments: title, icon, and routescript, respectively.  This
  47.                 function then makes a routing frame with these arguments and calls AddRouteFrame() with
  48.                 this new frame.  The routing frame it creates looks as such:
  49.                 
  50.                         {
  51.                             title:            title,            // Name to show up in the menu.
  52.                             icon:                icon,                // As that returned by GetPICTAsBits()
  53.                             
  54.                             routeScript:    routescript        // Function to be called.
  55.                         }
  56.                 
  57.                 
  58.             AddOpenItem()
  59.             
  60.                 This function takes three arguments, the title, the icon and the symbol of the item to
  61.                 open in root (e.g. 'iobox).  It builds a frame similar to the one above but with a
  62.                 method that opens the root item.
  63.                 
  64.                 
  65.             AddSeparator()
  66.             
  67.                 This function takes no arguments and adds a pick separator (dotted line) to the menu.
  68. */