home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
SCRNMS.ZIP
/
EDITOR.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-13
|
5KB
|
200 lines
/* editor.h
**
** Copyright (c) 1990, Chris Laforet Software/Chris Laforet
** All Rights Reserved
**
** Started: 18 February 1990
**
** Revision Information: $Logfile: F:/libs/editor/vcs/editor.h_v $
** $Date: 27 Feb 1990 09:11:38 $
** $Revision: 1.3 $
**
*/
#ifndef __SETJMP_H
#include <setjmp.h>
#endif
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef LIBRARY
#ifndef __TURBOC__
#ifndef __ZTC__
#ifndef PROTECTED
#pragma comment(lib,"LEDITOR.LIB")
#else
#pragma comment(lib,"LEDITORP.LIB")
#endif
#endif
#endif
#endif
/* 1. Constants and Macros */
#define E_INVALID 0
#define E_VALID 1
#define E_NOPAINT 2
#define E_EXIT 3
#define E_QUIT 4
#define E_END 5
#define E_FORE 6
#define E_BACK 7
#define E_PGDN 8
#define E_PGUP 9
#define E_ERROR 20
#define E_MACRO
#define ALPHA 1
#define NUMERIC 2
#define SIGNED_NUMERIC 4
#define ALPHA_NUMERIC 8
#define ALPHA_SYMBOLS 16
#define ALPHA_SPACE 32
#define ALPHA_NUMERIC_SYMBOLS 64
#define DOS_PATHNAME 128
#define ZIP_PLUS_4 256
#define JUMP 2048
#define DECIMAL_POINT 4096
#define TITLE_ONLY 0 /* field flags */
#define READ_ONLY 1 /* read only field...no modify */
#define FIELD 2
#define POP_UP 4
#define SELECT 8
#define REQUIRED 0x80
#define NON_FATAL 0 /* error returns */
#define FATAL 1
#define NOTICE 2
#define CLOCK_OFF 0
#define CLOCK_ON 1
/* 2. Structures and Unions */
struct choice
{
char choice_letter;
char *choice_string;
};
struct pop
{
int pop_ulc;
char *pop_title;
struct choice *pop_choices;
int pop_max_choices;
char pop_space;
char pop_shadow;
};
struct sel
{
int sel_ulc;
char *sel_title;
int sel_width;
char **sel_strings;
int sel_max_strings;
};
/******* The following structures are defined in HELPGEN.H ********/
struct hh /* help-header structure */
{
char hh_sig[8]; /* help file signiture "HELPGEN\0" */
int hh_pages; /* total number of pages (i.e. help screens) */
int hh_cols; /* width of help system (set at 78) */
int hh_rows; /* height of help system (set at 23) */
};
struct ph /* page header structure -- follows hh */
{
char ph_tag[41]; /* tag name for page */
char ph_title[61]; /* title for page */
long ph_offset; /* absolute offset in file to page data */
int ph_lines; /* number of lines on page */
int ph_links; /* number of links on page */
};
struct li /* link information structure -- precedes lines of page data */
{
char li_link[41]; /* tag name for link */
int li_col; /* starting column of link highlight */
int li_row; /* starting row of link highlight */
int li_len; /* length of link highlight */
};
/******* The previous structures are defined in HELPGEN.H ********/
/* 3. Global Variables */
extern unsigned long __cpu_speed;
extern int __error_color;
extern char _user_permission;
/* 4. Functions */
extern int far edit_field(int cursor,int hicolor,int locolor,int clock_flag,int clock_pos,int clock_color,char far *format,char *string,
int (far *user_function)(int cursor,int hicolor,int locolor,int clock_flag,int clock_pos,int clock_color,char *format,char *string,int *offset,int *string_offset,int insert,int keystroke,int action));
extern int far parse_entry(char entry);
extern void far set_jump_on(int total_time,jmp_buf jump_buffer);
extern void far set_jump_off(void);
extern void far update_time(int clock_pos,int clock_color);
extern int far read_keyboard(int clock_flag,int clock_pos,int clock_color);
extern void far beep(void);
extern int register_key(int key,int (far * action)(int,int,int,int));
extern void deregister_key(int key);
extern int (far *query_key(int key))(int,int,int,int);
extern int execute_key(int key,int clock_flag,int clock_pos,int clock_color);
extern int far pop_menu(int start,int hicolor,int locolor,char *title,int max_choices,struct choice *choices,int shadow,int space,int clock_flag,int clock_pos,int clock_color);
extern int far select_menu(int start,int hicolor,int locolor,int selcolor,char *title,int max_choices,char **choices,int width,int selection,int clock_flag,int clock_pos,int clock_color);
extern void far error(int type,char far *string,int clock_flag,int clock_pos,int clock_color);
extern void far set_critical_error(void);
extern int askyn(char *title,char *prompt,int hicolor,int locolor,int clock_flag,int clock_pos,int clock_color);
extern struct window *open_message(char *message,int color);
extern void close_message(struct window *wndw);
extern void far disable_boot(void);
extern void far enable_boot(void);
extern int open_help(char *pathname,int hilite_color,int normal_color);
extern void close_help(void);
extern void set_help_colors(int hilite_color,int normal_color);
extern void set_help_key(int key);
extern void register_help(char *topic);
extern void deregister_help(void);
extern char *query_help_topic(void);
extern void far pop_help(int clock_flag,int clock_pos,int clock_color);
#ifdef __cplusplus
}
#endif