home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / piemnsrc.sit / ReadMe.txt < prev    next >
Text File  |  1989-09-14  |  4KB  |  93 lines

  1. This folder contains three projects and their related files.  The use of 
  2. these projects is as follows:
  3.  
  4. PlotCircle.╣:        This project creates a program that when run generates a
  5.                     header file used by the other two projects.  The name of
  6.                     the header file is ╥circledata.h╙.  
  7.     
  8. PieMenus.╣:            This project is used to generate a stand-alone application
  9.                     that demonstrates the use of pie menus.  It exists only
  10.                     to debug modifications to the pie menu code that is used
  11.                     in the XCMD because there is no way other way to use LSC's
  12.                     debugger with XCMDs.
  13.  
  14. PiePopupXCMD.╣:        This project is used to generate the XFCN ╥PiePopup╙. 
  15.  
  16.  
  17.  
  18.  
  19. The following is a list of the source files used to build these projects:
  20.  
  21. circledata.h:        This is the header file generated by plotcircle.c.  It
  22.                     contains three collections of points that are used to
  23.                     plot the circles used for the pie menus.  The first set
  24.                     of points is of those points that comprise the little
  25.                     circle in the center of the pie menu.  This is the part
  26.                     of the pie menu where no selection takes place.  It is
  27.                     a hole in the middle to make the mouse motion a little
  28.                     less sensitve as well as to provide a convienent way to
  29.                     select none of the menu items.  The second set of points
  30.                     form the circle that is the outer part of the wedges that
  31.                     are drawn to form the pie.  The third set of points form
  32.                     the circle that is used to connect the label to their
  33.                     appropriate pie slices.
  34.  
  35. plotcircle.c:        This is the source code for the program that is used to
  36.                     generate the circledata.h file.  It computes all of the
  37.                     points that fall on a circle of a given radius.  It is
  38.                     these collection of points that are subsequently used
  39.                     in drawing the pie wedges.
  40.  
  41. Pie Popups.c:        This is a standalone application that is used to test
  42.                     the DrawPieMenu function.  It initializes the toolbox
  43.                     managers, constructs a dummy menu list, and calls the
  44.                     DrawPieMenu function to plot the menu.
  45.  
  46. PiePopupXCMD.c:        This file is the XCMD driver of the DrawPieMenu function.
  47.                     It accepts arguments from HyperCard and formats them for
  48.                     the call to DrawPieMenu().
  49.  
  50. Pie PopupWindow.c:    This is the file that contains the DrawPieMenu function.
  51.                     The way this function works is as follows:
  52.                         - It creates a new window centered about the mouse
  53.                         - Using the circle points it creates a region for
  54.                           each menu item in the form of a wedge of pie.  This
  55.                           was so that I could use the routines to determine
  56.                           if the mouse was within a region for highlighting
  57.                           purposes.
  58.                         - The regions are then plotted using patterns that 
  59.                           are carried with the program as global constant
  60.                           data.
  61.                         - The program them enters a spin-loop waiting for the
  62.                           user to select an item.
  63.                         - The index of the selected item is returned.
  64.  
  65. ParseMenuList.c:    This file contains the single function ParseMenuList().
  66.                     The purpose of this function is to remove any characters
  67.                     from the menu list passed by HyperCard that are not
  68.                     supported by the DrawPieMenu function.  Specifically it
  69.                     strips out the Menu Manager special characters for icons,
  70.                     check marks, line separators, etc.
  71.  
  72.  
  73.  
  74. The following source files are used as glue routines for the XCMD:
  75.     EvalExpr.c, NumToStr.c, StrToLong.c, StrToNum.c:
  76.  
  77.  
  78.  
  79. To Do:
  80.     I've never used QuickDraw before so I don't know how valuable this code is.
  81.     I started to augment this code to use off-screen bitmaps for display so that
  82.     the display would be snappier, but unfortunately I didn't complete the project.
  83.     I also started to use the new color QuickDraw calls to get the default colors
  84.     to display menus in.  I had somewhat limited success with this and decided
  85.     to get on with the point of the projec... to get peoples opinions on how pie
  86.     menus should be implemented.
  87.     
  88.     If anyone finds this code or the technique of pie menus of any value please
  89.     let me know of any improvements you make.
  90.     
  91. Thanks,
  92. Boyd Hays
  93.