cns_edit

	cns_edit(window_id.i2.v [,mode.i2.v] [,num_rows.i4.v]
		 [,num_columns.i4.v] [,command_type.i4.v] [,text_color.i4.v]
		 [,change_colors.i4.v] [,enter_symbols.i4.v]
		 [,user_key_func.f.v] [,user_key_data.g.v]
		 [,init_func.f.v])
	
	This routine allows the user to edit text in the window specified by
	"window_id".  This is an EDT style editor.  Upon entering the
	editor, blank lines will be interpreted as paragraph delineators.
	When exiting the editor it's up to the user to save the edited text,
	if desired.  (Note: The window must be created before calling this
	routine.)

	This editor uses the normal EDT keypad mode.  In addition there are
	fields for color choices and special symbol selection.  Special
	symbols can be inserted by pressing the function key "Insert Here".

	The number of rows and number of columns arguments are optional.
	This allows the caller to specify an editing region which is
	smaller than the window specified by "window_id".

	window_id	window ID
	[mode]		edit mode
			(CNS_EDIT_REPLACE_MODE -> typed in text simply
						  overwrites any existing
						  (default),
			 CNS_EDIT_INSERT_MODE -> standard insert mode,
			 CNS_EDIT_INSERT_WRAP -> standard insert mode with
						 word wrapping)
	[num_rows]	number of rows in the editing region
			(default is the size of the window specified by 
			 "window_id")
	[num_columns]	number of columns in the editing region
			(default is the size of the window specified by 
			 "window_id")
	[command_type]	type of command format
			(CNS_EDIT_FIELDS -> commands are entered by
					    discrete fields (default),
			 CNS_EDIT_MENU -> commands are all accessed via
					  a single command menu)
	[text_color]	default text color (default is CYAN)
			(constants are in cnsparam)
	[change_colors]	flag determining whether or not text colors can
			be changed
			(TRUE -> user may change text colors (default),
			 FALSE -> all text will be entered in the default
				  color)
	[enter_symbols]	flag determining whether or not special graphics
			characters can be entered in the text
			(TRUE -> user may enter special graphics symbols
				 (default),
			 FALSE -> no special graphics symbols may be entered)
	[user_key_func]	function to be executed upon each key press
			(function called as follows:
			 done.i4.v = user_key_func(wid.i2.v, key_data.s.r,
						   user_key_data.g.v,
						   edit_data.s.r,
						   edit_made.i4.v)
			 ("key_data" is a structure of type TEXT_CURSOR_DATA)
			 ("edit_data" is a structure of type CNS_EDIT_DATA)
			 (Valid return values include: CNS_EDIT_CONTINUE,
			  CNS_EDIT_DONT_PROCESS, CNS_EDIT_POST_PROCESS, and
			  CNS_EDIT_ADD_LINE.))
			(default is NULL)
	[user_key_data]	data to be passed to "user_key_func" (default is NULL)
	[init_func]	function to be executed once immediately after
			cns_edit has initialized
			(function called as follows:
			 init_func(wid.i2.v, user_key_data.g.v))
			(default is NULL)

	This function requires the following include files:

	cnsparam_h, cbslib_h

	Related functions:

	cns_edit_read_cursor, cns_edit_set_cursor_c, window_construct(_c),
	text_cursor_init_c

	C/C++ usage:

	short	window_id;
	short	mode = CNS_EDIT_REPLACE_MODE;
	int	status;
	int	num_rows = 0;
	int	num_columns = 0;
	int	command_type = CNS_EDIT_MENU;
	int	text_color = CYAN;
	int	change_colors = TRUE;
	int	enter_symbols = TRUE;
	int	user_key_func(short window_id, TEXT_CURSOR_DATA *key_data,
			      void *user_key_data);
	void	*user_key_data = (void *) NULL;
	void	init_func(short window_id, void *user_key_data);

	cns_edit(window_id,mode,num_rows,num_columns,command_type,text_color,
		 change_colors,enter_symbols,user_key_func,user_key_data,
		 init_func);