smart_menu_c

	status.i4.v = smart_menu_c(top_row.i4.v, left_column.i4.v,
				   text.i1a.r, entry_length.i4.v,
				   num_entries.i4.v, title.i1a.r, item.i4.r,
				   padding_chars.i4.v, enabled_entries.i1a.r
				   [,num_lines.i4.v] [,help_info.sa.r]
				   [,header_line.i1a.r] [,options.u4.v])

	This routine will display a scrollable popup menu with a user
	input field at the top if the number of entries is greater than
	the number of lines that can be displayed.

	top_row		top row of menu (use WMNGR_CENTER for centering
			or WINDOW_xxx_COORD macros in macro for special
			positioning)
	left_column	left column of menu (use WMNGR_CENTER for centering
			or WINDOW_xxx_COORD macros in macro for special
			positioning)
	text		menu entry text
	entry_length	length of a menu entry
			(If a value of zero is passed for this argument,
			 the routine will assume that all of the menu text is
			 contained in a single null terminated or descriptor
			 described string and will automatically determine the
			 length of a single menu item by dividing the total
			 string length by the number of items.)
	num_entries	number of menu entries
	title		null terminated window title  (If a value of NULL is
			passed for this argument, not title will be displayed.)
	item		returned item (starts at 1)
			(If the value passed for this argument has a value
			 between 1 and "num_entries", this will be marked
			 as the default entry indicated by a ">" character.
			 Also, the menu will be scrolled such that that
			 entry is at the top of the menu.)
	padding_chars	number of blank characters to insert before and
			after every menu entry (must be >= 1)
	enabled_entries	array of logical flags indicating which menu entries
			are enabled/active (If a value of NULL is passed for
			this argument, all menu entries will be enabled.)
			(MENU_ENABLED_ENTRY -> enabled entry,
			 MENU_DISABLED_ENTRY -> disabled entry,
			 MENU_SEPARATOR -> separator entry)
	[num_lines]	number of entries to display at a time
			(default is 0)
	[help_info]	entry by entry help callback information
			(array of HELP_CALLBACK_DATA structures)
			(A value of NULL can be passed for this argument,
			if no context sensitive menu help is desired.)
	[header_line]	null terminated text string that will be displayed
			in a nonscrolling banner at the top of the window
			(below the search input field and above the menu
			 entries) (default is NULL)
	[options]	optional menu feature flags
			(MENU_OPT_NONE -> no special menu options requested
					  (default),
			 MENU_OPT_FIT_WINDOW -> resize the background window
						if necessary to fit the menu,
			 MENU_OPT_SIZE_TO_TITLE -> resize the menu if
						   necessary to fit the
						   title and banner lines,
			 MENU_OPT_HEADER_SEPARATOR -> insert a separator line
						      between the header line
						      and the menu entries,
			 MENU_OPT_CENTER_DEFAULT -> attempt to center the
						    default selection int
						    the window,
			 MENU_OPT_TRUNCATE_BLANKS -> truncate trailing blanks)

	This function returns status values as follows:

	CBS_INVARG		invalid number of menu entries or
				padding characters
	CBS_MEMFAIL		dynamic memory allocation failure
	CBS_WINDOW_TOO_BIG	menu won't fit on screen
	TRUE			user made a valid menu selection
	FALSE			user interrupted outside of menu

	This function requires the following include files:

	cnsparam_h, cns_data_structs_h, cbslib_h, macro_h, acnet_errors_h

	Related functions:

	combo_menu_c, scroll_menu(_c), combo_menu_hs_c, scroll_menu_hs_c,
	logical_combo_menu_c, logical_scroll_menu(_c), wmenu(_c),
	popup_menu(_c), menu_create(_c), menu_setup_c, build_menu_text,
	menu_assert_choice_c, menu_is_open, window_restore_hint_c

	C/C++ usage:

	static const char	text[NUM_ENTRIES][NUM_CHARS] =
	{"Entry 1", "Entry 2", "Entry 3", "Entry 4", "Entry 5", "Entry 6"};
	static const char	title[] = "Title";
	char	*enabled_entries = (char *) NULL;
	char	*header_line = (char *) NULL;
	int	status;
	int	top_row = WMNGR_CENTER;
	int	left_column = WMNGR_CENTER;
	int	entry_length = ENTRY_LENGTH;
	int	num_entries = NUM_ENTRIES;
	int	item = 0;
	int	padding_chars = 1;
	int	num_lines = 0;
	unsigned int	options = MENU_OPT_NONE;
	HELP_CALLBACK_DATA	*help_info = (HELP_CALLBACK_DATA *) NULL;

	status = smart_menu_c(top_row,left_column,(char *) text,entry_length,
			      num_entries,title,&item, padding_chars,
			      enabled_entries,num_lines,help_info,header_line,
			      options);