file_acknowledge_c
status.i4.v = file_acknowledge_c(top_row.i4.v, left_column.i4.v,
num_columns.i4.v, num_rows.i4.v,
file_name.i1a.r [,call_me.f.v]
[,exit_switch.i4.v] [,title.i1a.r]
[,synchronous.i4.v] [,text_color.i4.v]
[,options.u4.v] [,search_string.i1a.r]
[,term_string.i1a.r])
This routine will display an acknowledge window with the message
text taken from a file. The user must click on the "OK" switch
to resume program activity.
top_row top row of window (use WMNGR_CENTER for centering
or WINDOW_xxx_COORD macros in macro for special
positioning)
left_column left column of window (use WMNGR_CENTER for centering
or WINDOW_xxx_COORD macros in macro for special
positioning)
file_name null-terminated string specifing the file
num_columns number of columns inside the window (If a value of 0
is passed, an optimal window width is found.)
num_rows number of rows inside the window (If a value of 0
is passed, an optimal window width is found.)
[text_color] text color (default is CYAN) (constants are in cnsparam)
[title] optional window title
(default title (NULL) is the name of the file)
[help_info] help callback information
(structure of type HELP_CALLBACK_DATA)
(default is NULL)
[options] file read options
(FILE_VIEW_OPT_NONE -> no options selected (default),
FILE_VIEW_OPT_NO_HTML -> strip HTML code,
FILE_VIEW_OPT_EXTRACT_CLIB_HELP -> extract only
CLIB-style help,
FILE_VIEW_OPT_SKIP_SEARCH -> skip file text preceding
the supplied search
string,
FILE_VIEW_OPT_USE_COLOR_TAGS -> look for embedded
color tags in the
file text and color
the text accordingly,
FILE_VIEW_OPT_SHOW_LINE_NUMBERS -> display line
numbers)
[search_string] string to search for (If this argument is supplied
and the string exists in the file text, the window
will be scrolled to the first occurrence of the string.)
(default is NULL)
[term_string] termination string (If this argument is supplied
and the string exists in the file text, the file
read will end when this string is found.)
(default is NULL)
This function returns status values as follows:
CBS_OK success
CBS_MEMFAIL failed in allocating dynamic memory
CBS_INVARG requested window is too large
CBS_NOTOPN couldn't open file
CBS_WINDOW_TOO_BIG file window won't fit on background window
This function requires the following include files:
cnsparam_h, cbslib_h, macro_h, acnet_errors_h
Related functions:
acknowledge(_c), file_decide_c, decide(_c), file_view_read,
file_view_select, file_view_find, window_restore_hint_c,
menu_setup_c
C/C++ usage:
static const char file_name[] = "/some_path/file_name.ext";
static const char title[] = "Title";
char *search_string = (char *) NULL;
char *term_string = (char *) NULL;
int status;
int top_row = WMNGR_CENTER;
int left_column = WMNGR_CENTER;
int num_columns = 0;
int num_rows = 0;
int text_color = CYAN;
unsigned int options = FILE_VIEW_OPT_NONE;
HELP_CALLBACK_DATA *help_info;
status = file_acknowledge_c(top_row,left_column,file_name,
num_columns,num_rows,text_color,
title,help_info,options,
search_string,term_string);