; ; File: Balloons.a ; ; Contains: Assembly Equates for calling Balloon Help ; ; Copyright: © 1989-1990 by Apple Computer, Inc., all rights reserved. ; ; IF &TYPE('__IncludingBalloons__') = 'UNDEFINED' THEN __IncludingBalloons__ SET 1 TITLE 'Balloons.a - Help Manager' ; ;___________________________________________________________________________________________________________ ; hmBalloonHelpVersion EQU 2 ; The real version of the Help Manager ; ; Help Mgr Error Codes in range: -850 to -874 ; hmHelpDisabled EQU -850 ; Show Balloons mode was off, call to routine ignored hmBalloonAborted EQU -853 ; Returned if mouse was moving or mouse wasn't in window port rect hmSameAsLastBalloon EQU -854 ; Returned from HMShowMenuBalloon if menu & item is same as last time hmHelpManagerNotInited EQU -855 ; Returned from HMGetHelpMenuHandle if help menu not setup hmSkippedBalloon EQU -857 ; Returned from calls if helpmsg specified a skip balloon hmWrongVersion EQU -858 ; Returned if help mgr resource was the wrong version hmUnknownHelpType EQU -859 ; Returned if help msg record contained a bad type hmOperationUnsupported EQU -861 ; Returned from HMShowBalloon call if bad method passed to routine hmNoBalloonUp EQU -862 ; Returned from HMRemoveBalloon if no balloon was visible when call was made hmCloseViewActive EQU -863 ; Returned from HMRemoveBalloon if CloseView was active ; kHMHelpMenuID EQU -16490 ; Resource ID and menu ID of help menu kHMAboutHelpItem EQU 1 ; help menu item number of About Balloon Help… kHMShowBalloonsItem EQU 3 ; help menu item number of Show/Hide Balloons ; kHMBalloonHelpID EQU -5696 ; ID of various Help Mgr package resources (in Pack14 range) kHMBalloonWDEFID EQU 126 ; Resource ID of the WDEF proc used in standard balloons ; helpItem EQU 1 ; key value in DITL template that corresponds to the help item ; ; Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources ; hmDefaultOptions EQU 0 ; default options for help manager resources hmUseSubID EQU 1 ; treat resID's in resources as subID's of driver base ID (for Desk Accessories) hmAbsoluteCoords EQU 2 ; ignore window port origin and treat rectangles as absolute coords (local to window) hmSaveBitsNoWindow EQU 4 ; don't create a window, just blast bits on screen. No update event is generated hmSaveBitsWindow EQU 8 ; create a window, but restore bits behind window when window goes away & generate update event hmMatchInTitle EQU 16 ; for hwin resources, match string anywhere in window title string ; ; Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources ; kHMStringItem EQU 1 ; pstring used in resource kHMPictItem EQU 2 ; 'PICT' ResID used in resource kHMStringResItem EQU 3 ; 'STR#' ResID & index used in resource kHMTEResItem EQU 6 ; Styled Text Edit ResID used in resource ('TEXT' & 'styl') kHMSTRResItem EQU 7 ; 'STR ' ResID used in resource kHMSkipItem EQU 256 ; don't display a balloon kHMCompareItem EQU 512 ; Compare pstring in menu item w/ PString in resource item ('hmnu' only) kHMNamedResourceItem EQU 1024 ; Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only) kHMTrackCntlItem EQU 2048 ; Reserved ; ; Constants for hmmHelpType's when filling out HMMessageRecord ; khmmString EQU 1 ; help message contains a PString khmmPict EQU 2 ; help message contains a resource ID to a 'PICT' resource khmmStringRes EQU 3 ; help message contains a res ID & index to a 'STR#' resource khmmTEHandle EQU 4 ; help message contains a Text Edit handle khmmPictHandle EQU 5 ; help message contains a Picture handle khmmTERes EQU 6 ; help message contains a res ID to 'TEXT' & 'styl' resources khmmSTRRes EQU 7 ; help message contains a res ID to a 'STR ' resource ; ; ResTypes for Styled TE Handles when extracting from Resources ; kHMTETextResType EQU 'TEXT' ; Resource Type of text data for styled TE record w/o style info kHMTEStyleResType EQU 'styl' ; Resource Type of style information for styled TE record ; Generic defines for the state parameter used when extracting 'hmnu' & 'hdlg' messages ; kHMEnabledItem EQU 0 ; item is enabled, but not checked or control value EQU 0 kHMDisabledItem EQU 1 ; item is disabled, grayed in menus or disabled in dialogs kHMCheckedItem EQU 2 ; item is enabled, and checked or control value EQU 1 kHMOtherItem EQU 3 ; item is enabled, and control value > 1 ; ; Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages ; kHMMenuResType EQU 'hmnu' ; ResType of help resource for supporting menus kHMDialogResType EQU 'hdlg' ; ResType of help resource for supporting dialogs kHMWindListResType EQU 'hwin' ; ResType of help resource for supporting windows kHMRectListResType EQU 'hrct' ; ResType of help resource for rectangles in windows kHMOverrideResType EQU 'hovr' ; ResType of help resource for overriding system balloons kHMFinderApplResType EQU 'hfdr' ; ResType of help resource for custom balloon in Finder ; ; Method parameters to pass to HMShowBalloon ; kHMRegularWindow EQU 0 ; Create a regular window floating above all windows kHMSaveBitsNoWindow EQU 1 ; Just save the bits and draw (for MDEF calls kHMSaveBitsWindow EQU 2 ; Regular window, save bits behind, AND generate update event ; ; help message structure (offsets into help message record) ; hmmHelpType EQU 0 hmmHelpMessage EQU 2 hmmHMSize EQU 4 + 256 ; HMMessageRecord worse case size ; ; help message size ; khmmMsgSize EQU 256 + 2 ; max pstring + type integer ; ; ;___________________________________________________________________________________________________________ ; ; Package selectors for Help Manager Package ; kHMGetHelpMenuHandle EQU $0200 ; 0 words of parameters kHMShowBalloon EQU $0B01 ; 11 words of parameters kHMRemoveBalloon EQU $0002 ; 0 words of parameters kHMGetBalloons EQU $0003 ; 0 words of params (Note: doesn't load package!) kHMSetBalloons EQU $0104 ; 1 word of parameters kHMShowMenuBalloon EQU $0E05 ; 14 words of parameters kHMGetIndHelpMsg EQU $1306 ; 19 words of parameters <12> kHMIsBalloon EQU $0007 ; 0 words of parameters kHMSetFont EQU $0108 ; 1 word of parameters kHMSetFontSize EQU $0109 ; 1 word of parameters kHMGetFont EQU $020A ; 2 words of parameters kHMGetFontSize EQU $020B ; 2 words of parameters kHMSetDialogResID EQU $010C ; 1 words of parameters kHMSetMenuResID EQU $020D ; 2 words of parameters kHMBalloonRect EQU $040E ; 4 words of parameters kHMBalloonPict EQU $040F ; 4 words of parameters kHMScanTemplateItems EQU $0410 ; 4 words of parameters kHMExtractHelpMsg EQU $0711 ; 7 words of parameters kHMFillCitationString EQU $0512 ; 5 words of parameters kHMGetDialogResID EQU $0213 ; 2 words of parameters kHMGetMenuResID EQU $0314 ; 3 words of parameters ; ;___________________________________________________________________________________________________________ ; ; Help Manager interface macros ; macro _HMGetHelpMenuHandle MOVE.W #kHMGetHelpMenuHandle,D0 _Pack14 endm macro _HMShowBalloon MOVE.W #kHMShowBalloon,D0 _Pack14 endm macro _HMRemoveBalloon MOVE.W #kHMRemoveBalloon,D0 _Pack14 endm macro _HMGetBalloons MOVE.W #kHMGetBalloons,D0 _Pack14 endm macro _HMSetBalloons MOVE.W #kHMSetBalloons,D0 _Pack14 endm macro _HMShowMenuBalloon MOVE.W #kHMShowMenuBalloon,D0 _Pack14 endm macro _HMSystemMenu MOVE.W #kHMSystemMenu,D0 _Pack14 endm macro _HMGetIndHelpMsg MOVE.W #kHMGetIndHelpMsg,D0 _Pack14 endm macro _HMIsBalloon MOVE.W #kHMIsBalloon,D0 _Pack14 endm macro _HMSetFont MOVE.W #kHMSetFont,D0 _Pack14 endm macro _HMGetFont MOVE.W #kHMGetFont,D0 _Pack14 endm macro _HMGetFontSize MOVE.W #kHMGetFontSize,D0 _Pack14 endm macro _HMSetDialogResID MOVE.W #kHMSetDialogResID,D0 _Pack14 endm macro _HMSetMenuResID MOVE.W #kHMSetMenuResID,D0 _Pack14 endm macro _HMBalloonRect MOVE.W #kHMBalloonRect,D0 _Pack14 endm macro _HMBalloonPict MOVE.W #kHMBalloonPict,D0 _Pack14 endm macro _HMScanTemplateItems MOVE.W #kHMScanTemplateItems,D0 _Pack14 endm macro _HMExtractHelpMsg MOVE.W #kHMExtractHelpMsg,D0 _Pack14 endm macro _HMFillCitationString MOVE.W #kHMFillCitationString,D0 _Pack14 endm macro _HMGetDialogResID MOVE.W #kHMGetDialogResID,D0 _Pack14 endm macro _HMGetMenuResID MOVE.W #kHMGetMenuResID,D0 _Pack14 endm macro _HMGetBalloonWindow MOVE.W #kHMGetBalloonWindow,D0 _Pack14 endm ENDIF ; ...already included