home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************\
- | Purpose :: This header file contains all of the global data |
- | structures and function prototypes necessary for this |
- | code resource to operate correctly. |
- |-----------------------------------------------------------------------|
- | Copyright © Joe Pillera, 1990. All Rights Reserved. |
- | Copyright © MacTutor Magazine, 1990. All Rights Reserved. |
- \***********************************************************************/
-
-
- /* Maximum number of topics */
- #define MAX_TOPICS 50
-
- /* Dialog box information */
- #define Help_Window 300
- #define Help_Not_Found 301
- #define Help_Error 302
- #define OK_Button 1
- #define Topics_Area 2
- #define Display_Area 3
- #define Next_Button 4
- #define Prev_Button 5
- #define Message_Area 7
-
- /* Constant for first screen in a series */
- #define Initial_Picture 0
-
- /* Are we in picture or text mode? */
- typedef enum {
- pict,
- text
- } ViewMode;
-
- /* Errors I check for */
- typedef enum {
- err_no_HTBL, /* Missing ID=128 of the help table */
- err_min_res, /* Not enough help screens specified */
- err_intro_pict, /* Intro screen must be a picture */
- err_bad_type, /* Not a TEXT or PICT screen (typo?) */
- err_no_pict, /* The PICT for this topic isnt there */
- err_no_text /* The TEXT for this topic isnt there */
- } ErrorTypes;
-
- /* Read the HTBL resource information */
- typedef struct {
- int First_Menu;
- int Last_Menu;
- int Number_Of_Topics;
- long type;
- int resource_start;
- int resource_end;
- Str255 topic_name;
- } **Help_Info_Handle;
-
- /* Other constants */
- #define NOT_FOUND -1
- #define ON 0
- #define OFF 255
- #define NIL 0L
- #define FRONT (WindowPtr)-1
-
- /* Function prototypes */
- extern void Add_List_String( Str255 *, ListHandle );
- extern void Bold_Button( DialogPtr, int );
- extern void Center_Window( DialogPtr, int, Boolean );
- extern Boolean Create_Help( void );
- extern void Dialog_String( DialogPtr, int, char * );
- extern void Display_Pict( int );
- extern void Display_Text( void );
- extern void Error_Message( ErrorTypes );
- extern void Help_Event_Loop( void );
- extern void Handle_List_Event( int );
- extern void Handle_Update( void );
- extern void Init_Help( void );
- extern void Kill_Window( void );
- extern pascal void main( void );
- extern pascal void My_Scroll_Filter ( ControlHandle, int );
- extern int ParseInt( char ** );
- extern long ParseOSType( char **);
- extern void ParseString( char *, char ** );
- extern void pStrCat( char *, char *, char * );
- extern void pStrCopy( char *, char * );
- extern void Refresh_Topics( void );
- extern void Scroll_Picture( int );
- extern void Scroll_Text( int, int );
- extern void Set_Button_State( int, Boolean );
- extern void User_Message( char * );
-