home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-10 | 3.0 KB | 64 lines | [TEXT/PJMM] |
- unit HelpGlobals;
-
- interface
-
- const
- noErr = 0;
- HmiLNotAvail = 1; {*The main 'HmiL' resource was not read into memory. Probably a wrong ID number.*}
- HierHmiLNotAvail = 2; {*An 'HmiL' resource for an hierarchical menu was not found.*}
- HTextNotAvail = 3; {*A specified 'TEXT' resource was not found.*}
- HelpHandleErr = 4; {*There was an error in getting a handle to the Help Menu.*}
- NilHandle = 5; {*There was a problem allocating a handle. Probably due to lack of memory.*}
- DataErr = 6; {*There was an error in finding the selected menu.*}
- {*The menu setup didn't work or the data was trashed*}
- NoMenu = 7; {*If the menu ID passed to DoHelp is not associated with the Help*}
- {*menu, return with this code*}
-
- _Gestalt = $A1AD; {*This is the trap number of the Gestalt Function.*}
-
- {**************************************************************}
- {* Change these globals for different effects on the appearance and placement of the Help Menu*}
- {**************************************************************}
- FONTFACE = 3; {*This is the typeface of the display*}
- FONTSIZE = 12; {*This is the font size of the display*}
-
- HELPMENUTITLE = 'Help'; {*This is the title of the menu built when the System 7 Help*}
- {*menu is not accessible.*}
-
- NonSevenMenuID = 32767; {*This is the menu ID used when the System 7 Help menu*}
- {*is not accessible. Make sure it does not conflict with*}
- {*a menu ID from your application.*}
-
- MaxMenu = 1; {*This is the maximum number of hierarchical menus you want to have in the Help menu.*}
- {**************************************************************}
-
- type
- MPtr = ^MitemList; {*A pointer to the Menu Item List.*}
- MHandle = ^MPtr; {*A handle to the Menu Item List.*}
- MItemList = record
- ItemTitle: Str255; {*The title of this menu item…Used only for data integrity check.*}
- HelpTextID: Integer; {*The ID of the 'TEXT' resource containing the help text for this item.*}
- NextItem: MHandle; {*A handle to the next item in the list.*}
- end;
-
- MenuRecs = record
- ID: Integer; {*The ID# of this menu.*}
- Master: MHandle; {*A handle to the first Item List Record in the linked list.*}
- end;
-
- MenuSetup = array[0..MaxMenu] of MenuRecs;
- {*An array of the different menus within and including the Help Menu.*}
-
- var
- HelpMenuHandle: MenuHandle; {*Holds the handle to the Help Menu.*}
- HelpMenuID: integer; {*Holds the menu ID of the Help menu in case not System 7.*}
- TheMenu: MenuSetup; {*Holds the menu ID's and items of the Help Menu.*}
- HelpMenuItems: integer; {*Holds the number of menu items initially in the Help Menu*}
- {*under System 7.*}
- USEHMENUS: Boolean; {*Set this to true if you are going to use hierarchical menus.*}
- {*By setting this to true, your help items will be put in a new menu*}
- {*at the end of the current menu bar. They will NOT appear in the Help menu designated*}
- {*under System 7. Set this before calling InitHelp*}
-
- implementation
- end.