]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/man/menu_pattern.3x.html
ncurses 5.0
[ncurses.git] / Ada95 / html / man / menu_pattern.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4        <STRONG>menu_pattern</STRONG> - get and set a menu's pattern buffer
5
6
7 </PRE>
8 <H2>SYNOPSIS</H2><PRE>
9        <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
10        int set_menu_pattern(MENU *menu, const char *pattern);
11        char *menu_pattern(const MENU *menu);
12
13
14 </PRE>
15 <H2>DESCRIPTION</H2><PRE>
16        Every  menu  has  an  associated pattern match buffer.  As
17        input events that are printable ASCII characters come  in,
18        they  are  appended  to this match buffer and tested for a
19        match, as described in <STRONG><A HREF="menu_driver.3x.html">menu_driver(3X)</A></STRONG>.
20
21        The function <STRONG>set_menu_pattern</STRONG> sets the pattern buffer  for
22        the  given menu and tries to find the first matching item.
23        If it succeeds, that item becomes  current;  if  not,  the
24        current item does not change.
25
26        The  function  <STRONG>menu_pattern</STRONG>  returns the pattern buffer of
27        the given <EM>menu</EM>.
28
29
30 </PRE>
31 <H2>RETURN VALUE</H2><PRE>
32        The function <STRONG>menu_pattern</STRONG>  returns  <STRONG>NULL</STRONG>  on  error.   The
33        function  <STRONG>set_menu_pattern</STRONG>  may return the following error
34        codes:
35
36        <STRONG>E_OK</STRONG> The routine succeeded.
37
38        <STRONG>E_SYSTEM_ERROR</STRONG>
39             System error occurred (see <STRONG>errno</STRONG>).
40
41        <STRONG>E_BAD_ARGUMENT</STRONG>
42             Routine detected an incorrect or  out-of-range  argu-
43             ment.
44
45        <STRONG>E_NO_MATCH</STRONG>
46             Character failed to match.
47
48
49 </PRE>
50 <H2>SEE ALSO</H2><PRE>
51        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
52
53
54 </PRE>
55 <H2>NOTES</H2><PRE>
56        The header file <STRONG><menu.h></STRONG> automatically includes the header
57        file <STRONG><curses.h></STRONG>.
58
59
60 </PRE>
61 <H2>PORTABILITY</H2><PRE>
62        These routines emulate the System V  menu  library.   They
63        were not supported on Version 7 or BSD versions.
64
65
66 </PRE>
67 <H2>AUTHORS</H2><PRE>
68        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
69        curses by Eric S. Raymond.
70 </PRE>
71 </BODY>
72 </HTML>