This folder contains three projects and their related files. The use of these projects is as follows: PlotCircle.¹: This project creates a program that when run generates a header file used by the other two projects. The name of the header file is Òcircledata.hÓ. PieMenus.¹: This project is used to generate a stand-alone application that demonstrates the use of pie menus. It exists only to debug modifications to the pie menu code that is used in the XCMD because there is no way other way to use LSC's debugger with XCMDs. PiePopupXCMD.¹: This project is used to generate the XFCN ÒPiePopupÓ. The following is a list of the source files used to build these projects: circledata.h: This is the header file generated by plotcircle.c. It contains three collections of points that are used to plot the circles used for the pie menus. The first set of points is of those points that comprise the little circle in the center of the pie menu. This is the part of the pie menu where no selection takes place. It is a hole in the middle to make the mouse motion a little less sensitve as well as to provide a convienent way to select none of the menu items. The second set of points form the circle that is the outer part of the wedges that are drawn to form the pie. The third set of points form the circle that is used to connect the label to their appropriate pie slices. plotcircle.c: This is the source code for the program that is used to generate the circledata.h file. It computes all of the points that fall on a circle of a given radius. It is these collection of points that are subsequently used in drawing the pie wedges. Pie Popups.c: This is a standalone application that is used to test the DrawPieMenu function. It initializes the toolbox managers, constructs a dummy menu list, and calls the DrawPieMenu function to plot the menu. PiePopupXCMD.c: This file is the XCMD driver of the DrawPieMenu function. It accepts arguments from HyperCard and formats them for the call to DrawPieMenu(). Pie PopupWindow.c: This is the file that contains the DrawPieMenu function. The way this function works is as follows: - It creates a new window centered about the mouse - Using the circle points it creates a region for each menu item in the form of a wedge of pie. This was so that I could use the routines to determine if the mouse was within a region for highlighting purposes. - The regions are then plotted using patterns that are carried with the program as global constant data. - The program them enters a spin-loop waiting for the user to select an item. - The index of the selected item is returned. ParseMenuList.c: This file contains the single function ParseMenuList(). The purpose of this function is to remove any characters from the menu list passed by HyperCard that are not supported by the DrawPieMenu function. Specifically it strips out the Menu Manager special characters for icons, check marks, line separators, etc. The following source files are used as glue routines for the XCMD: EvalExpr.c, NumToStr.c, StrToLong.c, StrToNum.c: To Do: I've never used QuickDraw before so I don't know how valuable this code is. I started to augment this code to use off-screen bitmaps for display so that the display would be snappier, but unfortunately I didn't complete the project. I also started to use the new color QuickDraw calls to get the default colors to display menus in. I had somewhat limited success with this and decided to get on with the point of the projec... to get peoples opinions on how pie menus should be implemented. If anyone finds this code or the technique of pie menus of any value please let me know of any improvements you make. Thanks, Boyd Hays