]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_pattern.3x
ncurses 4.2
[ncurses.git] / man / menu_pattern.3x
1 .'" $Id: menu_pattern.3x,v 1.4 1997/12/06 22:10:02 tom Exp $
2 .TH menu_pattern 3X ""
3 .SH NAME
4 \fBmenu_pattern\fR - get and set a menu's pattern buffer
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_menu_pattern(MENU *menu, const char *pattern);
9 .br
10 char *menu_pattern(const MENU *menu);
11 .br
12 .SH DESCRIPTION
13 Every menu has an associated pattern match buffer.  As input events that are
14 printable ASCII characters come in, they are appended to this match buffer
15 and tested for a match, as described in \fBmenu_driver\fR(3X).
16
17 The function \fBset_menu_pattern\fR sets the pattern buffer for the given menu
18 and tries to find the first matching item.  If it succeeds, that item becomes
19 current; if not, the current item does not change.  
20
21 The function \fBmenu_pattern\fR returns the pattern buffer of the given
22 \fImenu\fR.
23 .SH RETURN VALUE
24 The function \fBmenu_pattern\fR returns \fBNULL\fR on error.  The function
25 \fBset_menu_pattern\fR may return the following error codes:
26 .TP 5
27 \fBE_OK\fR
28 The routine succeeded.
29 .TP 5
30 \fBE_SYSTEM_ERROR\fR
31 System error occurred (see \fBerrno\fR).
32 .TP 5
33 \fBE_BAD_ARGUMENT\fR
34 Routine detected an incorrect or out-of-range argument.
35 .TP 5
36 \fBE_NO_MATCH\fR
37 Character failed to match.
38 .SH SEE ALSO
39 \fBcurses\fR(3X), \fBmenu\fR(3X).
40 .SH NOTES
41 The header file \fB<menu.h>\fR automatically includes the header file
42 \fB<curses.h>\fR.
43 .SH PORTABILITY
44 These routines emulate the System V menu library.  They were not supported on
45 Version 7 or BSD versions.
46 .SH AUTHORS
47 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
48 S. Raymond.
49 .\"#
50 .\"# The following sets edit modes for GNU EMACS
51 .\"# Local Variables:
52 .\"# mode:nroff
53 .\"# fill-column:79
54 .\"# End: