ncurses 5.8 - patch 20110226
[ncurses.git] / doc / html / ada / terminal_interface-curses-menus__adb.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML><HEAD><TITLE>terminal_interface-curses-menus.adb</TITLE></HEAD>
3 <BODY>
4 <HR><DIV ALIGN="center"><H1> File : terminal_interface-curses-menus.adb </H1></DIV><HR>
5 <PRE>
6 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
7 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
8 <FONT COLOR=green><EM>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</EM></FONT>
9 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
10 <FONT COLOR=green><EM>--                      Terminal_Interface.Curses.Menus                     --</EM></FONT>
11 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
12 <FONT COLOR=green><EM>--                                 B O D Y                                  --</EM></FONT>
13 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
14 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
15 <FONT COLOR=green><EM>-- Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              --</EM></FONT>
16 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
17 <FONT COLOR=green><EM>-- Permission is hereby granted, free of charge, to any person obtaining a  --</EM></FONT>
18 <FONT COLOR=green><EM>-- copy of this software and associated documentation files (the            --</EM></FONT>
19 <FONT COLOR=green><EM>-- "Software"), to deal in the Software without restriction, including      --</EM></FONT>
20 <FONT COLOR=green><EM>-- without limitation the rights to use, copy, modify, merge, publish,      --</EM></FONT>
21 <FONT COLOR=green><EM>-- distribute, distribute with modifications, sublicense, and/or sell       --</EM></FONT>
22 <FONT COLOR=green><EM>-- copies of the Software, and to permit persons to whom the Software is    --</EM></FONT>
23 <FONT COLOR=green><EM>-- furnished to do so, subject to the following conditions:                 --</EM></FONT>
24 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
25 <FONT COLOR=green><EM>-- The above copyright notice and this permission notice shall be included  --</EM></FONT>
26 <FONT COLOR=green><EM>-- in all copies or substantial portions of the Software.                   --</EM></FONT>
27 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
28 <FONT COLOR=green><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</EM></FONT>
29 <FONT COLOR=green><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</EM></FONT>
30 <FONT COLOR=green><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</EM></FONT>
31 <FONT COLOR=green><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</EM></FONT>
32 <FONT COLOR=green><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</EM></FONT>
33 <FONT COLOR=green><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</EM></FONT>
34 <FONT COLOR=green><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</EM></FONT>
35 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
36 <FONT COLOR=green><EM>-- Except as contained in this notice, the name(s) of the above copyright   --</EM></FONT>
37 <FONT COLOR=green><EM>-- holders shall not be used in advertising or otherwise to promote the     --</EM></FONT>
38 <FONT COLOR=green><EM>-- sale, use or other dealings in this Software without prior written       --</EM></FONT>
39 <FONT COLOR=green><EM>-- authorization.                                                           --</EM></FONT>
40 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
41 <FONT COLOR=green><EM>--  Author:  Juergen Pfeifer, 1996</EM></FONT>
42 <FONT COLOR=green><EM>--  Version Control:</EM></FONT>
43 <FONT COLOR=green><EM>--  @Revision: 1.27 @</EM></FONT>
44 <FONT COLOR=green><EM>--  @Date: 2009/12/26 17:38:58 @</EM></FONT>
45 <FONT COLOR=green><EM>--  Binding Version 01.00</EM></FONT>
46 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
47 <b>with</b> Ada.Unchecked_Deallocation;
48 <b>with</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_50_35">Aux</A>; <b>use</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#ref_50_35">Aux</A>;
49
50 <b>with</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C; <b>use</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C;
51 <b>with</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Strings; <b>use</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Strings;
52 <b>with</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Pointers;
53
54 <b>with</b> Ada.Unchecked_Conversion;
55
56 <b>package</b> <b>body</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<FONT COLOR=red><A NAME="ref_51_40" HREF="terminal_interface-curses-menus__ads.htm#ref_49_35">Menus</A></FONT> <b>is</b>
57
58    <b>type</b> C_Item_Array <b>is</b> <b>array</b> (Natural <b>range</b> &lt;&gt;) <b>of</b> <b>aliased</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
59    <b>package</b> I_Array <b>is</b> <b>new</b>
60      <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Pointers (Natural, <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>, C_Item_Array, <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>);
61
62    <b>use</b> <b>type</b> System.Bit_Order;
63    <b>subtype</b> <FONT COLOR=red><A NAME="ref_58_12">chars_ptr</A></FONT> <b>is</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Strings.chars_ptr;
64
65    <b>function</b> MOS_2_CInt <b>is</b> <b>new</b>
66      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>,
67                                <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>);
68
69    <b>function</b> CInt_2_MOS <b>is</b> <b>new</b>
70      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>,
71                                <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>);
72
73    <b>function</b> IOS_2_CInt <b>is</b> <b>new</b>
74      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>,
75                                <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>);
76
77    <b>function</b> CInt_2_IOS <b>is</b> <b>new</b>
78      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>,
79                                <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>);
80
81 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
82    <b>procedure</b> <FONT COLOR=red><A NAME="ref_77_14" HREF="terminal_interface-curses-menus__ads.htm#ref_106_14">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="ref_77_28" HREF="terminal_interface-curses-menus__ads.htm#ref_106_28">Key</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_65_12">Menu_Request_Code</A>;
83                            <FONT COLOR=red><A NAME="ref_78_28" HREF="terminal_interface-curses-menus__ads.htm#ref_107_28">Name</A></FONT> : <b>out</b> String)
84    <b>is</b>
85       <b>function</b> <FONT COLOR=red><A NAME="ref_80_16">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="ref_80_30" HREF="terminal_interface-curses-menus__adb.htm#ref_80_16">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
86       <b>pragma</b> Import (C, Request_Name, "menu_request_name");
87    <b>begin</b>
88       <A HREF="terminal_interface-curses-aux__ads.htm#ref_116_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_80_16">Request_Name</A> (<A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_106_28">Key</A>)), <A HREF="terminal_interface-curses-menus__ads.htm#ref_107_28">Name</A>);
89    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_106_14">Request_Name</A>;
90
91    <b>function</b> <FONT COLOR=red><A NAME="ref_86_13" HREF="terminal_interface-curses-menus__ads.htm#ref_109_14">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="ref_86_27" HREF="terminal_interface-curses-menus__ads.htm#ref_109_28">Key</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_65_12">Menu_Request_Code</A>) <b>return</b> String
92    <b>is</b>
93       <b>function</b> <FONT COLOR=red><A NAME="ref_88_16">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="ref_88_30" HREF="terminal_interface-curses-menus__adb.htm#ref_88_16">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
94       <b>pragma</b> Import (C, Request_Name, "menu_request_name");
95    <b>begin</b>
96       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_121_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_88_16">Request_Name</A> (<A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_109_28">Key</A>)));
97    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_109_14">Request_Name</A>;
98
99    <b>function</b> <FONT COLOR=red><A NAME="ref_94_13" HREF="terminal_interface-curses-menus__ads.htm#ref_191_13">Create</A></FONT> (<FONT COLOR=red><A NAME="ref_94_21" HREF="terminal_interface-curses-menus__ads.htm#ref_191_21">Name</A></FONT>        : String;
100                     <FONT COLOR=red><A NAME="ref_95_21" HREF="terminal_interface-curses-menus__ads.htm#ref_192_21">Description</A></FONT> : String := "") <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>
101    <b>is</b>
102       <b>type</b> <FONT COLOR=red><A NAME="ref_97_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.char;
103       <b>function</b> <FONT COLOR=red><A NAME="ref_98_16">Newitem</A></FONT> (<FONT COLOR=red><A NAME="ref_98_25" HREF="terminal_interface-curses-menus__adb.htm#ref_98_16">Name</A></FONT>, <FONT COLOR=red><A NAME="ref_98_31" HREF="terminal_interface-curses-menus__adb.htm#ref_98_16">Desc</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_97_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
104       <b>pragma</b> Import (C, Newitem, "new_item");
105
106       <b>type</b> Name_String <b>is</b> <b>new</b> char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#ref_191_21">Name</A>'Length);
107       <b>type</b> <FONT COLOR=red><A NAME="ref_102_12">Name_String_Ptr</A></FONT> <b>is</b> <b>access</b> Name_String;
108       <b>pragma</b> Controlled (<A HREF="terminal_interface-curses-menus__adb.htm#ref_102_12">Name_String_Ptr</A>);
109
110       <b>type</b> Desc_String <b>is</b> <b>new</b> char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#ref_192_21">Description</A>'Length);
111       <b>type</b> <FONT COLOR=red><A NAME="ref_106_12">Desc_String_Ptr</A></FONT> <b>is</b> <b>access</b> Desc_String;
112       <b>pragma</b> Controlled (<A HREF="terminal_interface-curses-menus__adb.htm#ref_106_12">Desc_String_Ptr</A>);
113
114       <FONT COLOR=red><A NAME="ref_109_7">Name_Str</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_102_12">Name_String_Ptr</A> := <b>new</b> Name_String;
115       <FONT COLOR=red><A NAME="ref_110_7">Desc_Str</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_106_12">Desc_String_Ptr</A> := <b>new</b> Desc_String;
116       <FONT COLOR=red><A NAME="ref_111_7">Name_Len</A></FONT>, <FONT COLOR=red><A NAME="ref_111_17">Desc_Len</A></FONT> : size_t;
117       <FONT COLOR=red><A NAME="ref_112_7">Result</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
118    <b>begin</b>
119       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#ref_191_21">Name</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_109_7">Name_Str</A>.<b>all</b>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_111_7">Name_Len</A>);
120       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#ref_192_21">Description</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_110_7">Desc_Str</A>.<b>all</b>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_111_17">Desc_Len</A>);
121       <A HREF="terminal_interface-curses-menus__adb.htm#ref_112_7">Result</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_98_16">Newitem</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_109_7">Name_Str</A>.<b>all</b> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_109_7">Name_Str</A>.<b>all</b>'First)'<b>Access</b>,
122                          <A HREF="terminal_interface-curses-menus__adb.htm#ref_110_7">Desc_Str</A>.<b>all</b> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_110_7">Desc_Str</A>.<b>all</b>'First)'<b>Access</b>);
123       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_112_7">Result</A> = <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A> <b>then</b>
124          <b>raise</b> <A HREF="terminal_interface-curses__ads.htm#ref_389_4">Eti_System_Error</A>;
125       <b>end</b> <b>if</b>;
126       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_112_7">Result</A>;
127    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_191_13">Create</A>;
128
129    <b>procedure</b> <FONT COLOR=red><A NAME="ref_124_14" HREF="terminal_interface-curses-menus__ads.htm#ref_203_14">Delete</A></FONT> (<FONT COLOR=red><A NAME="ref_124_22" HREF="terminal_interface-curses-menus__ads.htm#ref_203_22">Itm</A></FONT> : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>)
130    <b>is</b>
131       <b>function</b> <FONT COLOR=red><A NAME="ref_126_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="ref_126_26" HREF="terminal_interface-curses-menus__adb.htm#ref_126_16">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
132       <b>pragma</b> Import (C, Descname, "item_description");
133       <b>function</b> <FONT COLOR=red><A NAME="ref_128_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="ref_128_26" HREF="terminal_interface-curses-menus__adb.htm#ref_128_16">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
134       <b>pragma</b> Import (C, Itemname, "item_name");
135
136       <b>function</b> <FONT COLOR=red><A NAME="ref_131_16">Freeitem</A></FONT> (<FONT COLOR=red><A NAME="ref_131_26" HREF="terminal_interface-curses-menus__adb.htm#ref_131_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
137       <b>pragma</b> Import (C, Freeitem, "free_item");
138
139       <FONT COLOR=red><A NAME="ref_134_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
140       <FONT COLOR=red><A NAME="ref_135_7">Ptr</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
141    <b>begin</b>
142       <A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_126_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_203_22">Itm</A>);
143       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A> /= Null_Ptr <b>then</b>
144          <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Strings.Free (<A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A>);
145       <b>end</b> <b>if</b>;
146       <A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_128_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_203_22">Itm</A>);
147       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A> /= Null_Ptr <b>then</b>
148          <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.Strings.Free (<A HREF="terminal_interface-curses-menus__adb.htm#ref_135_7">Ptr</A>);
149       <b>end</b> <b>if</b>;
150       <A HREF="terminal_interface-curses-menus__adb.htm#ref_134_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_131_16">Freeitem</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_203_22">Itm</A>);
151       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_134_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
152          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_134_7">Res</A>);
153       <b>end</b> <b>if</b>;
154       <A HREF="terminal_interface-curses-menus__ads.htm#ref_203_22">Itm</A> := <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>;
155    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_203_14">Delete</A>;
156 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
157    <b>procedure</b> <FONT COLOR=red><A NAME="ref_152_14" HREF="terminal_interface-curses-menus__ads.htm#ref_212_14">Set_Value</A></FONT> (<FONT COLOR=red><A NAME="ref_152_25" HREF="terminal_interface-curses-menus__ads.htm#ref_212_25">Itm</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
158                         <FONT COLOR=red><A NAME="ref_153_25" HREF="terminal_interface-curses-menus__ads.htm#ref_213_25">Value</A></FONT> : Boolean := True)
159    <b>is</b>
160       <b>function</b> <FONT COLOR=red><A NAME="ref_155_16">Set_Item_Val</A></FONT> (<FONT COLOR=red><A NAME="ref_155_30" HREF="terminal_interface-curses-menus__adb.htm#ref_155_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
161                              <FONT COLOR=red><A NAME="ref_156_30" HREF="terminal_interface-curses-menus__adb.htm#ref_155_16">Val</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
162       <b>pragma</b> Import (C, Set_Item_Val, "set_item_value");
163
164       <FONT COLOR=red><A NAME="ref_159_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_155_16">Set_Item_Val</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_212_25">Itm</A>, Boolean'Pos (<A HREF="terminal_interface-curses-menus__ads.htm#ref_213_25">Value</A>));
165    <b>begin</b>
166       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_159_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
167          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_159_7">Res</A>);
168       <b>end</b> <b>if</b>;
169    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_212_14">Set_Value</A>;
170
171    <b>function</b> <FONT COLOR=red><A NAME="ref_166_13" HREF="terminal_interface-curses-menus__ads.htm#ref_218_13">Value</A></FONT> (<FONT COLOR=red><A NAME="ref_166_20" HREF="terminal_interface-curses-menus__ads.htm#ref_218_20">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> Boolean
172    <b>is</b>
173       <b>function</b> <FONT COLOR=red><A NAME="ref_168_16">Item_Val</A></FONT> (<FONT COLOR=red><A NAME="ref_168_26" HREF="terminal_interface-curses-menus__adb.htm#ref_168_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
174       <b>pragma</b> Import (C, Item_Val, "item_value");
175    <b>begin</b>
176       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_168_16">Item_Val</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_218_20">Itm</A>) = <A HREF="terminal_interface-curses-aux__ads.htm#ref_75_4">Curses_False</A> <b>then</b>
177          <b>return</b> False;
178       <b>else</b>
179          <b>return</b> True;
180       <b>end</b> <b>if</b>;
181    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_218_13">Value</A>;
182
183 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
184    <b>function</b> <FONT COLOR=red><A NAME="ref_179_13" HREF="terminal_interface-curses-menus__ads.htm#ref_227_13">Visible</A></FONT> (<FONT COLOR=red><A NAME="ref_179_22" HREF="terminal_interface-curses-menus__ads.htm#ref_227_22">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> Boolean
185    <b>is</b>
186       <b>function</b> <FONT COLOR=red><A NAME="ref_181_16">Item_Vis</A></FONT> (<FONT COLOR=red><A NAME="ref_181_26" HREF="terminal_interface-curses-menus__adb.htm#ref_181_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
187       <b>pragma</b> Import (C, Item_Vis, "item_visible");
188    <b>begin</b>
189       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_181_16">Item_Vis</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_227_22">Itm</A>) = <A HREF="terminal_interface-curses-aux__ads.htm#ref_75_4">Curses_False</A> <b>then</b>
190          <b>return</b> False;
191       <b>else</b>
192          <b>return</b> True;
193       <b>end</b> <b>if</b>;
194    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_227_13">Visible</A>;
195 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
196    <b>procedure</b> <FONT COLOR=red><A NAME="ref_191_14" HREF="terminal_interface-curses-menus__ads.htm#ref_236_14">Set_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_191_27" HREF="terminal_interface-curses-menus__ads.htm#ref_236_27">Itm</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
197                           <FONT COLOR=red><A NAME="ref_192_27" HREF="terminal_interface-curses-menus__ads.htm#ref_237_27">Options</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>)
198    <b>is</b>
199       <b>function</b> <FONT COLOR=red><A NAME="ref_194_16">Set_Item_Opts</A></FONT> (<FONT COLOR=red><A NAME="ref_194_31" HREF="terminal_interface-curses-menus__adb.htm#ref_194_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
200                               <FONT COLOR=red><A NAME="ref_195_31" HREF="terminal_interface-curses-menus__adb.htm#ref_194_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
201       <b>pragma</b> Import (C, Set_Item_Opts, "set_item_opts");
202
203       <FONT COLOR=red><A NAME="ref_198_7">Opt</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := IOS_2_CInt (<A HREF="terminal_interface-curses-menus__ads.htm#ref_237_27">Options</A>);
204       <FONT COLOR=red><A NAME="ref_199_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
205    <b>begin</b>
206       <A HREF="terminal_interface-curses-menus__adb.htm#ref_199_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_194_16">Set_Item_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_236_27">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_198_7">Opt</A>);
207       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_199_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
208          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_199_7">Res</A>);
209       <b>end</b> <b>if</b>;
210    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_236_14">Set_Options</A>;
211
212    <b>procedure</b> <FONT COLOR=red><A NAME="ref_207_14" HREF="terminal_interface-curses-menus__ads.htm#ref_242_14">Switch_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_207_30" HREF="terminal_interface-curses-menus__ads.htm#ref_242_30">Itm</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
213                              <FONT COLOR=red><A NAME="ref_208_30" HREF="terminal_interface-curses-menus__ads.htm#ref_243_30">Options</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>;
214                              <FONT COLOR=red><A NAME="ref_209_30" HREF="terminal_interface-curses-menus__ads.htm#ref_244_30">On</A></FONT>      : Boolean := True)
215    <b>is</b>
216       <b>function</b> <FONT COLOR=red><A NAME="ref_211_16">Item_Opts_On</A></FONT> (<FONT COLOR=red><A NAME="ref_211_30" HREF="terminal_interface-curses-menus__adb.htm#ref_211_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
217                              <FONT COLOR=red><A NAME="ref_212_30" HREF="terminal_interface-curses-menus__adb.htm#ref_211_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
218       <b>pragma</b> Import (C, Item_Opts_On, "item_opts_on");
219       <b>function</b> <FONT COLOR=red><A NAME="ref_214_16">Item_Opts_Off</A></FONT> (<FONT COLOR=red><A NAME="ref_214_31" HREF="terminal_interface-curses-menus__adb.htm#ref_214_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
220                               <FONT COLOR=red><A NAME="ref_215_31" HREF="terminal_interface-curses-menus__adb.htm#ref_214_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
221       <b>pragma</b> Import (C, Item_Opts_Off, "item_opts_off");
222
223       <FONT COLOR=red><A NAME="ref_218_7">Opt</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := IOS_2_CInt (<A HREF="terminal_interface-curses-menus__ads.htm#ref_243_30">Options</A>);
224       <FONT COLOR=red><A NAME="ref_219_7">Err</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
225    <b>begin</b>
226       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_244_30">On</A> <b>then</b>
227          <A HREF="terminal_interface-curses-menus__adb.htm#ref_219_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_211_16">Item_Opts_On</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_242_30">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_218_7">Opt</A>);
228       <b>else</b>
229          <A HREF="terminal_interface-curses-menus__adb.htm#ref_219_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_214_16">Item_Opts_Off</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_242_30">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_218_7">Opt</A>);
230       <b>end</b> <b>if</b>;
231       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_219_7">Err</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
232          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_219_7">Err</A>);
233       <b>end</b> <b>if</b>;
234    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_242_14">Switch_Options</A>;
235
236    <b>procedure</b> <FONT COLOR=red><A NAME="ref_231_14" HREF="terminal_interface-curses-menus__ads.htm#ref_251_14">Get_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_231_27" HREF="terminal_interface-curses-menus__ads.htm#ref_251_27">Itm</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
237                           <FONT COLOR=red><A NAME="ref_232_27" HREF="terminal_interface-curses-menus__ads.htm#ref_252_27">Options</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>)
238    <b>is</b>
239       <b>function</b> <FONT COLOR=red><A NAME="ref_234_16">Item_Opts</A></FONT> (<FONT COLOR=red><A NAME="ref_234_27" HREF="terminal_interface-curses-menus__adb.htm#ref_234_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
240       <b>pragma</b> Import (C, Item_Opts, "item_opts");
241
242       <FONT COLOR=red><A NAME="ref_237_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_234_16">Item_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_251_27">Itm</A>);
243    <b>begin</b>
244       <A HREF="terminal_interface-curses-menus__ads.htm#ref_252_27">Options</A> := CInt_2_IOS (<A HREF="terminal_interface-curses-menus__adb.htm#ref_237_7">Res</A>);
245    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_251_14">Get_Options</A>;
246
247    <b>function</b> <FONT COLOR=red><A NAME="ref_242_13" HREF="terminal_interface-curses-menus__ads.htm#ref_256_13">Get_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_242_26" HREF="terminal_interface-curses-menus__ads.htm#ref_256_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A> := <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>
248    <b>is</b>
249       <FONT COLOR=red><A NAME="ref_244_7">Ios</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>;
250    <b>begin</b>
251       <A HREF="terminal_interface-curses-menus__ads.htm#ref_251_14">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_256_26">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_244_7">Ios</A>);
252       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_244_7">Ios</A>;
253    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_256_13">Get_Options</A>;
254 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
255    <b>procedure</b> <FONT COLOR=red><A NAME="ref_250_14" HREF="terminal_interface-curses-menus__ads.htm#ref_265_14">Name</A></FONT> (<FONT COLOR=red><A NAME="ref_250_20" HREF="terminal_interface-curses-menus__ads.htm#ref_265_20">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
256                    <FONT COLOR=red><A NAME="ref_251_20" HREF="terminal_interface-curses-menus__ads.htm#ref_266_20">Name</A></FONT> : <b>out</b> String)
257    <b>is</b>
258       <b>function</b> <FONT COLOR=red><A NAME="ref_253_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="ref_253_26" HREF="terminal_interface-curses-menus__adb.htm#ref_253_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
259       <b>pragma</b> Import (C, Itemname, "item_name");
260    <b>begin</b>
261       <A HREF="terminal_interface-curses-aux__ads.htm#ref_116_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_253_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_265_20">Itm</A>), <A HREF="terminal_interface-curses-menus__ads.htm#ref_266_20">Name</A>);
262    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_265_14">Name</A>;
263
264    <b>function</b> <FONT COLOR=red><A NAME="ref_259_13" HREF="terminal_interface-curses-menus__ads.htm#ref_268_14">Name</A></FONT> (<FONT COLOR=red><A NAME="ref_259_19" HREF="terminal_interface-curses-menus__ads.htm#ref_268_20">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> String
265    <b>is</b>
266       <b>function</b> <FONT COLOR=red><A NAME="ref_261_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="ref_261_26" HREF="terminal_interface-curses-menus__adb.htm#ref_261_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
267       <b>pragma</b> Import (C, Itemname, "item_name");
268    <b>begin</b>
269       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_121_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_261_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_268_20">Itm</A>));
270    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_268_14">Name</A>;
271
272    <b>procedure</b> <FONT COLOR=red><A NAME="ref_267_14" HREF="terminal_interface-curses-menus__ads.htm#ref_274_14">Description</A></FONT> (<FONT COLOR=red><A NAME="ref_267_27" HREF="terminal_interface-curses-menus__ads.htm#ref_274_27">Itm</A></FONT>         : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
273                           <FONT COLOR=red><A NAME="ref_268_27" HREF="terminal_interface-curses-menus__ads.htm#ref_275_27">Description</A></FONT> : <b>out</b> String)
274    <b>is</b>
275       <b>function</b> <FONT COLOR=red><A NAME="ref_270_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="ref_270_26" HREF="terminal_interface-curses-menus__adb.htm#ref_270_16">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
276       <b>pragma</b> Import (C, Descname, "item_description");
277    <b>begin</b>
278       <A HREF="terminal_interface-curses-aux__ads.htm#ref_116_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_270_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_274_27">Itm</A>), <A HREF="terminal_interface-curses-menus__ads.htm#ref_275_27">Description</A>);
279    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_274_14">Description</A>;
280
281    <b>function</b> <FONT COLOR=red><A NAME="ref_276_13" HREF="terminal_interface-curses-menus__ads.htm#ref_278_14">Description</A></FONT> (<FONT COLOR=red><A NAME="ref_276_26" HREF="terminal_interface-curses-menus__ads.htm#ref_278_27">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> String
282    <b>is</b>
283       <b>function</b> <FONT COLOR=red><A NAME="ref_278_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="ref_278_26" HREF="terminal_interface-curses-menus__adb.htm#ref_278_16">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
284       <b>pragma</b> Import (C, Descname, "item_description");
285    <b>begin</b>
286       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_121_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_278_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_278_27">Itm</A>));
287    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_278_14">Description</A>;
288 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
289    <b>procedure</b> <FONT COLOR=red><A NAME="ref_284_14" HREF="terminal_interface-curses-menus__ads.htm#ref_288_14">Set_Current</A></FONT> (<FONT COLOR=red><A NAME="ref_284_27" HREF="terminal_interface-curses-menus__ads.htm#ref_288_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
290                           <FONT COLOR=red><A NAME="ref_285_27" HREF="terminal_interface-curses-menus__ads.htm#ref_289_27">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>)
291    <b>is</b>
292       <b>function</b> <FONT COLOR=red><A NAME="ref_287_16">Set_Curr_Item</A></FONT> (<FONT COLOR=red><A NAME="ref_287_31" HREF="terminal_interface-curses-menus__adb.htm#ref_287_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
293                               <FONT COLOR=red><A NAME="ref_288_31" HREF="terminal_interface-curses-menus__adb.htm#ref_287_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
294       <b>pragma</b> Import (C, Set_Curr_Item, "set_current_item");
295
296       <FONT COLOR=red><A NAME="ref_291_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_287_16">Set_Curr_Item</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_288_27">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_289_27">Itm</A>);
297    <b>begin</b>
298       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_291_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
299          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_291_7">Res</A>);
300       <b>end</b> <b>if</b>;
301    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_288_14">Set_Current</A>;
302
303    <b>function</b> <FONT COLOR=red><A NAME="ref_298_13" HREF="terminal_interface-curses-menus__ads.htm#ref_294_13">Current</A></FONT> (<FONT COLOR=red><A NAME="ref_298_22" HREF="terminal_interface-curses-menus__ads.htm#ref_294_22">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>
304    <b>is</b>
305       <b>function</b> <FONT COLOR=red><A NAME="ref_300_16">Curr_Item</A></FONT> (<FONT COLOR=red><A NAME="ref_300_27" HREF="terminal_interface-curses-menus__adb.htm#ref_300_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>;
306       <b>pragma</b> Import (C, Curr_Item, "current_item");
307
308       <FONT COLOR=red><A NAME="ref_303_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_300_16">Curr_Item</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_294_22">Men</A>);
309    <b>begin</b>
310       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_303_7">Res</A> = <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A> <b>then</b>
311          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
312       <b>end</b> <b>if</b>;
313       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_303_7">Res</A>;
314    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_294_13">Current</A>;
315
316    <b>procedure</b> <FONT COLOR=red><A NAME="ref_311_14" HREF="terminal_interface-curses-menus__ads.htm#ref_299_14">Set_Top_Row</A></FONT> (<FONT COLOR=red><A NAME="ref_311_27" HREF="terminal_interface-curses-menus__ads.htm#ref_299_27">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
317                           <FONT COLOR=red><A NAME="ref_312_27" HREF="terminal_interface-curses-menus__ads.htm#ref_300_27">Line</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A>)
318    <b>is</b>
319       <b>function</b> <FONT COLOR=red><A NAME="ref_314_16">Set_Toprow</A></FONT> (<FONT COLOR=red><A NAME="ref_314_28" HREF="terminal_interface-curses-menus__adb.htm#ref_314_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
320                            <FONT COLOR=red><A NAME="ref_315_28" HREF="terminal_interface-curses-menus__adb.htm#ref_314_16">Line</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
321       <b>pragma</b> Import (C, Set_Toprow, "set_top_row");
322
323       <FONT COLOR=red><A NAME="ref_318_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_314_16">Set_Toprow</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_299_27">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_300_27">Line</A>));
324    <b>begin</b>
325       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_318_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
326          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_318_7">Res</A>);
327       <b>end</b> <b>if</b>;
328    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_299_14">Set_Top_Row</A>;
329
330    <b>function</b> <FONT COLOR=red><A NAME="ref_325_13" HREF="terminal_interface-curses-menus__ads.htm#ref_305_13">Top_Row</A></FONT> (<FONT COLOR=red><A NAME="ref_325_22" HREF="terminal_interface-curses-menus__ads.htm#ref_305_22">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A>
331    <b>is</b>
332       <b>function</b> <FONT COLOR=red><A NAME="ref_327_16">Toprow</A></FONT> (<FONT COLOR=red><A NAME="ref_327_24" HREF="terminal_interface-curses-menus__adb.htm#ref_327_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
333       <b>pragma</b> Import (C, Toprow, "top_row");
334
335       <FONT COLOR=red><A NAME="ref_330_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_327_16">Toprow</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_305_22">Men</A>);
336    <b>begin</b>
337       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_330_7">Res</A> = <A HREF="terminal_interface-curses-aux__ads.htm#ref_72_4">Curses_Err</A> <b>then</b>
338          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
339       <b>end</b> <b>if</b>;
340       <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_330_7">Res</A>);
341    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_305_13">Top_Row</A>;
342
343    <b>function</b> <FONT COLOR=red><A NAME="ref_338_13" HREF="terminal_interface-curses-menus__ads.htm#ref_310_13">Get_Index</A></FONT> (<FONT COLOR=red><A NAME="ref_338_24" HREF="terminal_interface-curses-menus__ads.htm#ref_310_24">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> Positive
344    <b>is</b>
345       <b>function</b> <FONT COLOR=red><A NAME="ref_340_16">Get_Itemindex</A></FONT> (<FONT COLOR=red><A NAME="ref_340_31" HREF="terminal_interface-curses-menus__adb.htm#ref_340_16">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
346       <b>pragma</b> Import (C, Get_Itemindex, "item_index");
347
348       <FONT COLOR=red><A NAME="ref_343_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_340_16">Get_Itemindex</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_310_24">Itm</A>);
349    <b>begin</b>
350       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_343_7">Res</A> = <A HREF="terminal_interface-curses-aux__ads.htm#ref_72_4">Curses_Err</A> <b>then</b>
351          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
352       <b>end</b> <b>if</b>;
353       <b>return</b> Positive (Natural (<A HREF="terminal_interface-curses-menus__adb.htm#ref_343_7">Res</A>) + Positive'First);
354    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_310_13">Get_Index</A>;
355 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
356    <b>procedure</b> <FONT COLOR=red><A NAME="ref_351_14" HREF="terminal_interface-curses-menus__ads.htm#ref_322_14">Post</A></FONT> (<FONT COLOR=red><A NAME="ref_351_20" HREF="terminal_interface-curses-menus__ads.htm#ref_322_20">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
357                    <FONT COLOR=red><A NAME="ref_352_20" HREF="terminal_interface-curses-menus__ads.htm#ref_323_20">Post</A></FONT> : Boolean := True)
358    <b>is</b>
359       <b>function</b> <FONT COLOR=red><A NAME="ref_354_16">M_Post</A></FONT> (<FONT COLOR=red><A NAME="ref_354_24" HREF="terminal_interface-curses-menus__adb.htm#ref_354_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
360       <b>pragma</b> Import (C, M_Post, "post_menu");
361       <b>function</b> <FONT COLOR=red><A NAME="ref_356_16">M_Unpost</A></FONT> (<FONT COLOR=red><A NAME="ref_356_26" HREF="terminal_interface-curses-menus__adb.htm#ref_356_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
362       <b>pragma</b> Import (C, M_Unpost, "unpost_menu");
363
364       <FONT COLOR=red><A NAME="ref_359_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
365    <b>begin</b>
366       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_323_20">Post</A> <b>then</b>
367          <A HREF="terminal_interface-curses-menus__adb.htm#ref_359_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_354_16">M_Post</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_322_20">Men</A>);
368       <b>else</b>
369          <A HREF="terminal_interface-curses-menus__adb.htm#ref_359_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_356_16">M_Unpost</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_322_20">Men</A>);
370       <b>end</b> <b>if</b>;
371       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_359_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
372          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_359_7">Res</A>);
373       <b>end</b> <b>if</b>;
374    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_322_14">Post</A>;
375 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
376    <b>procedure</b> <FONT COLOR=red><A NAME="ref_371_14" HREF="terminal_interface-curses-menus__ads.htm#ref_333_14">Set_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_371_27" HREF="terminal_interface-curses-menus__ads.htm#ref_333_27">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
377                           <FONT COLOR=red><A NAME="ref_372_27" HREF="terminal_interface-curses-menus__ads.htm#ref_334_27">Options</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>)
378    <b>is</b>
379       <b>function</b> <FONT COLOR=red><A NAME="ref_374_16">Set_Menu_Opts</A></FONT> (<FONT COLOR=red><A NAME="ref_374_31" HREF="terminal_interface-curses-menus__adb.htm#ref_374_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
380                               <FONT COLOR=red><A NAME="ref_375_31" HREF="terminal_interface-curses-menus__adb.htm#ref_374_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
381       <b>pragma</b> Import (C, Set_Menu_Opts, "set_menu_opts");
382
383       <FONT COLOR=red><A NAME="ref_378_7">Opt</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := MOS_2_CInt (<A HREF="terminal_interface-curses-menus__ads.htm#ref_334_27">Options</A>);
384       <FONT COLOR=red><A NAME="ref_379_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
385    <b>begin</b>
386       <A HREF="terminal_interface-curses-menus__adb.htm#ref_379_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_374_16">Set_Menu_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_333_27">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_378_7">Opt</A>);
387       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_379_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
388          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_379_7">Res</A>);
389       <b>end</b> <b>if</b>;
390    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_333_14">Set_Options</A>;
391
392    <b>procedure</b> <FONT COLOR=red><A NAME="ref_387_14" HREF="terminal_interface-curses-menus__ads.htm#ref_339_14">Switch_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_387_30" HREF="terminal_interface-curses-menus__ads.htm#ref_339_30">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
393                              <FONT COLOR=red><A NAME="ref_388_30" HREF="terminal_interface-curses-menus__ads.htm#ref_340_30">Options</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>;
394                              <FONT COLOR=red><A NAME="ref_389_30" HREF="terminal_interface-curses-menus__ads.htm#ref_341_30">On</A></FONT>      : Boolean := True)
395    <b>is</b>
396       <b>function</b> <FONT COLOR=red><A NAME="ref_391_16">Menu_Opts_On</A></FONT> (<FONT COLOR=red><A NAME="ref_391_30" HREF="terminal_interface-curses-menus__adb.htm#ref_391_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
397                              <FONT COLOR=red><A NAME="ref_392_30" HREF="terminal_interface-curses-menus__adb.htm#ref_391_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
398       <b>pragma</b> Import (C, Menu_Opts_On, "menu_opts_on");
399       <b>function</b> <FONT COLOR=red><A NAME="ref_394_16">Menu_Opts_Off</A></FONT> (<FONT COLOR=red><A NAME="ref_394_31" HREF="terminal_interface-curses-menus__adb.htm#ref_394_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
400                               <FONT COLOR=red><A NAME="ref_395_31" HREF="terminal_interface-curses-menus__adb.htm#ref_394_16">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
401       <b>pragma</b> Import (C, Menu_Opts_Off, "menu_opts_off");
402
403       <FONT COLOR=red><A NAME="ref_398_7">Opt</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := MOS_2_CInt (<A HREF="terminal_interface-curses-menus__ads.htm#ref_340_30">Options</A>);
404       <FONT COLOR=red><A NAME="ref_399_7">Err</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
405    <b>begin</b>
406       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_341_30">On</A> <b>then</b>
407          <A HREF="terminal_interface-curses-menus__adb.htm#ref_399_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_391_16">Menu_Opts_On</A>  (<A HREF="terminal_interface-curses-menus__ads.htm#ref_339_30">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_398_7">Opt</A>);
408       <b>else</b>
409          <A HREF="terminal_interface-curses-menus__adb.htm#ref_399_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_394_16">Menu_Opts_Off</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_339_30">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_398_7">Opt</A>);
410       <b>end</b> <b>if</b>;
411       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_399_7">Err</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
412          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_399_7">Err</A>);
413       <b>end</b> <b>if</b>;
414    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_339_14">Switch_Options</A>;
415
416    <b>procedure</b> <FONT COLOR=red><A NAME="ref_411_14" HREF="terminal_interface-curses-menus__ads.htm#ref_347_14">Get_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_411_27" HREF="terminal_interface-curses-menus__ads.htm#ref_347_27">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
417                           <FONT COLOR=red><A NAME="ref_412_27" HREF="terminal_interface-curses-menus__ads.htm#ref_348_27">Options</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>)
418    <b>is</b>
419       <b>function</b> <FONT COLOR=red><A NAME="ref_414_16">Menu_Opts</A></FONT> (<FONT COLOR=red><A NAME="ref_414_27" HREF="terminal_interface-curses-menus__adb.htm#ref_414_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
420       <b>pragma</b> Import (C, Menu_Opts, "menu_opts");
421
422       <FONT COLOR=red><A NAME="ref_417_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_414_16">Menu_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_347_27">Men</A>);
423    <b>begin</b>
424       <A HREF="terminal_interface-curses-menus__ads.htm#ref_348_27">Options</A> := CInt_2_MOS (<A HREF="terminal_interface-curses-menus__adb.htm#ref_417_7">Res</A>);
425    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_347_14">Get_Options</A>;
426
427    <b>function</b> <FONT COLOR=red><A NAME="ref_422_13" HREF="terminal_interface-curses-menus__ads.htm#ref_352_13">Get_Options</A></FONT> (<FONT COLOR=red><A NAME="ref_422_26" HREF="terminal_interface-curses-menus__ads.htm#ref_352_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A> := <A HREF="terminal_interface-curses-menus__ads.htm#ref_63_4">Null_Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>
428    <b>is</b>
429       <FONT COLOR=red><A NAME="ref_424_7">Mos</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>;
430    <b>begin</b>
431       <A HREF="terminal_interface-curses-menus__ads.htm#ref_347_14">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_352_26">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_424_7">Mos</A>);
432       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_424_7">Mos</A>;
433    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_352_13">Get_Options</A>;
434 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
435    <b>procedure</b> <FONT COLOR=red><A NAME="ref_430_14" HREF="terminal_interface-curses-menus__ads.htm#ref_361_14">Set_Window</A></FONT> (<FONT COLOR=red><A NAME="ref_430_26" HREF="terminal_interface-curses-menus__ads.htm#ref_361_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
436                          <FONT COLOR=red><A NAME="ref_431_26" HREF="terminal_interface-curses-menus__ads.htm#ref_362_26">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>)
437    <b>is</b>
438       <b>function</b> <FONT COLOR=red><A NAME="ref_433_16">Set_Menu_Win</A></FONT> (<FONT COLOR=red><A NAME="ref_433_30" HREF="terminal_interface-curses-menus__adb.htm#ref_433_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
439                              <FONT COLOR=red><A NAME="ref_434_30" HREF="terminal_interface-curses-menus__adb.htm#ref_433_16">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
440       <b>pragma</b> Import (C, Set_Menu_Win, "set_menu_win");
441
442       <FONT COLOR=red><A NAME="ref_437_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_433_16">Set_Menu_Win</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_361_26">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_362_26">Win</A>);
443    <b>begin</b>
444       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_437_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
445          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_437_7">Res</A>);
446       <b>end</b> <b>if</b>;
447    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_361_14">Set_Window</A>;
448
449    <b>function</b> <FONT COLOR=red><A NAME="ref_444_13" HREF="terminal_interface-curses-menus__ads.htm#ref_367_13">Get_Window</A></FONT> (<FONT COLOR=red><A NAME="ref_444_25" HREF="terminal_interface-curses-menus__ads.htm#ref_367_25">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>
450    <b>is</b>
451       <b>function</b> <FONT COLOR=red><A NAME="ref_446_16">Menu_Win</A></FONT> (<FONT COLOR=red><A NAME="ref_446_26" HREF="terminal_interface-curses-menus__adb.htm#ref_446_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>;
452       <b>pragma</b> Import (C, Menu_Win, "menu_win");
453
454       <FONT COLOR=red><A NAME="ref_449_7">W</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_446_16">Menu_Win</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_367_25">Men</A>);
455    <b>begin</b>
456       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_449_7">W</A>;
457    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_367_13">Get_Window</A>;
458
459    <b>procedure</b> <FONT COLOR=red><A NAME="ref_454_14" HREF="terminal_interface-curses-menus__ads.htm#ref_372_14">Set_Sub_Window</A></FONT> (<FONT COLOR=red><A NAME="ref_454_30" HREF="terminal_interface-curses-menus__ads.htm#ref_372_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
460                              <FONT COLOR=red><A NAME="ref_455_30" HREF="terminal_interface-curses-menus__ads.htm#ref_373_30">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>)
461    <b>is</b>
462       <b>function</b> <FONT COLOR=red><A NAME="ref_457_16">Set_Menu_Sub</A></FONT> (<FONT COLOR=red><A NAME="ref_457_30" HREF="terminal_interface-curses-menus__adb.htm#ref_457_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
463                              <FONT COLOR=red><A NAME="ref_458_30" HREF="terminal_interface-curses-menus__adb.htm#ref_457_16">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
464       <b>pragma</b> Import (C, Set_Menu_Sub, "set_menu_sub");
465
466       <FONT COLOR=red><A NAME="ref_461_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_457_16">Set_Menu_Sub</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_372_30">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_373_30">Win</A>);
467    <b>begin</b>
468       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_461_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
469          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_461_7">Res</A>);
470       <b>end</b> <b>if</b>;
471    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_372_14">Set_Sub_Window</A>;
472
473    <b>function</b> <FONT COLOR=red><A NAME="ref_468_13" HREF="terminal_interface-curses-menus__ads.htm#ref_378_13">Get_Sub_Window</A></FONT> (<FONT COLOR=red><A NAME="ref_468_29" HREF="terminal_interface-curses-menus__ads.htm#ref_378_29">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>
474    <b>is</b>
475       <b>function</b> <FONT COLOR=red><A NAME="ref_470_16">Menu_Sub</A></FONT> (<FONT COLOR=red><A NAME="ref_470_26" HREF="terminal_interface-curses-menus__adb.htm#ref_470_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A>;
476       <b>pragma</b> Import (C, Menu_Sub, "menu_sub");
477
478       <FONT COLOR=red><A NAME="ref_473_7">W</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#ref_57_9">Window</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_470_16">Menu_Sub</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_378_29">Men</A>);
479    <b>begin</b>
480       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_473_7">W</A>;
481    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_378_13">Get_Sub_Window</A>;
482
483    <b>procedure</b> <FONT COLOR=red><A NAME="ref_478_14" HREF="terminal_interface-curses-menus__ads.htm#ref_383_14">Scale</A></FONT> (<FONT COLOR=red><A NAME="ref_478_21" HREF="terminal_interface-curses-menus__ads.htm#ref_383_21">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
484                     <FONT COLOR=red><A NAME="ref_479_21" HREF="terminal_interface-curses-menus__ads.htm#ref_384_21">Lines</A></FONT>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_63_12">Line_Count</A>;
485                     <FONT COLOR=red><A NAME="ref_480_21" HREF="terminal_interface-curses-menus__ads.htm#ref_385_21">Columns</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_65_12">Column_Count</A>)
486    <b>is</b>
487       <b>type</b> <FONT COLOR=red><A NAME="ref_482_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
488       <b>function</b> <FONT COLOR=red><A NAME="ref_483_16">M_Scale</A></FONT> (<FONT COLOR=red><A NAME="ref_483_25" HREF="terminal_interface-curses-menus__adb.htm#ref_483_16">Men</A></FONT>    : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
489                         <FONT COLOR=red><A NAME="ref_484_25" HREF="terminal_interface-curses-menus__adb.htm#ref_483_16">Yp</A></FONT>, <FONT COLOR=red><A NAME="ref_484_29" HREF="terminal_interface-curses-menus__adb.htm#ref_483_16">Xp</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_482_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
490       <b>pragma</b> Import (C, M_Scale, "scale_menu");
491
492       <FONT COLOR=red><A NAME="ref_487_7">X</A></FONT>, <FONT COLOR=red><A NAME="ref_487_10">Y</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
493       <FONT COLOR=red><A NAME="ref_488_7">Res</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_483_16">M_Scale</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_383_21">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_487_10">Y</A>'<b>Access</b>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_487_7">X</A>'<b>Access</b>);
494    <b>begin</b>
495       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_488_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
496          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_488_7">Res</A>);
497       <b>end</b> <b>if</b>;
498       <A HREF="terminal_interface-curses-menus__ads.htm#ref_384_21">Lines</A> := <A HREF="terminal_interface-curses__ads.htm#ref_63_12">Line_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_487_10">Y</A>);
499       <A HREF="terminal_interface-curses-menus__ads.htm#ref_385_21">Columns</A> := <A HREF="terminal_interface-curses__ads.htm#ref_65_12">Column_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_487_7">X</A>);
500    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_383_14">Scale</A>;
501 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
502    <b>procedure</b> <FONT COLOR=red><A NAME="ref_497_14" HREF="terminal_interface-curses-menus__ads.htm#ref_394_14">Position_Cursor</A></FONT> (<FONT COLOR=red><A NAME="ref_497_31" HREF="terminal_interface-curses-menus__ads.htm#ref_394_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>)
503    <b>is</b>
504       <b>function</b> <FONT COLOR=red><A NAME="ref_499_16">Pos_Menu_Cursor</A></FONT> (<FONT COLOR=red><A NAME="ref_499_33" HREF="terminal_interface-curses-menus__adb.htm#ref_499_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
505       <b>pragma</b> Import (C, Pos_Menu_Cursor, "pos_menu_cursor");
506
507       <FONT COLOR=red><A NAME="ref_502_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_499_16">Pos_Menu_Cursor</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_394_31">Men</A>);
508    <b>begin</b>
509       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_502_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
510          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_502_7">Res</A>);
511       <b>end</b> <b>if</b>;
512    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_394_14">Position_Cursor</A>;
513
514 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
515    <b>procedure</b> <FONT COLOR=red><A NAME="ref_510_14" HREF="terminal_interface-curses-menus__ads.htm#ref_403_14">Set_Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_510_24" HREF="terminal_interface-curses-menus__ads.htm#ref_403_24">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
516                        <FONT COLOR=red><A NAME="ref_511_24" HREF="terminal_interface-curses-menus__ads.htm#ref_404_24">Mark</A></FONT> : String)
517    <b>is</b>
518       <b>type</b> <FONT COLOR=red><A NAME="ref_513_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.char;
519       <b>function</b> <FONT COLOR=red><A NAME="ref_514_16">Set_Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_514_26" HREF="terminal_interface-curses-menus__adb.htm#ref_514_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
520                          <FONT COLOR=red><A NAME="ref_515_26" HREF="terminal_interface-curses-menus__adb.htm#ref_514_16">Mark</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_513_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
521       <b>pragma</b> Import (C, Set_Mark, "set_menu_mark");
522
523       <FONT COLOR=red><A NAME="ref_518_7">Txt</A></FONT> : char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#ref_404_24">Mark</A>'Length);
524       <FONT COLOR=red><A NAME="ref_519_7">Len</A></FONT> : size_t;
525       <FONT COLOR=red><A NAME="ref_520_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
526    <b>begin</b>
527       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#ref_404_24">Mark</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_518_7">Txt</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_519_7">Len</A>);
528       <A HREF="terminal_interface-curses-menus__adb.htm#ref_520_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_514_16">Set_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_403_24">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_518_7">Txt</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_518_7">Txt</A>'First)'<b>Access</b>);
529       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_520_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
530          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_520_7">Res</A>);
531       <b>end</b> <b>if</b>;
532    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_403_14">Set_Mark</A>;
533
534    <b>procedure</b> <FONT COLOR=red><A NAME="ref_529_14" HREF="terminal_interface-curses-menus__ads.htm#ref_409_14">Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_529_20" HREF="terminal_interface-curses-menus__ads.htm#ref_409_20">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
535                    <FONT COLOR=red><A NAME="ref_530_20" HREF="terminal_interface-curses-menus__ads.htm#ref_410_20">Mark</A></FONT> : <b>out</b> String)
536    <b>is</b>
537       <b>function</b> <FONT COLOR=red><A NAME="ref_532_16">Get_Menu_Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_532_31" HREF="terminal_interface-curses-menus__adb.htm#ref_532_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
538       <b>pragma</b> Import (C, Get_Menu_Mark, "menu_mark");
539    <b>begin</b>
540       <A HREF="terminal_interface-curses-aux__ads.htm#ref_116_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_532_16">Get_Menu_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_409_20">Men</A>), <A HREF="terminal_interface-curses-menus__ads.htm#ref_410_20">Mark</A>);
541    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_409_14">Mark</A>;
542
543    <b>function</b> <FONT COLOR=red><A NAME="ref_538_13" HREF="terminal_interface-curses-menus__ads.htm#ref_413_14">Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_538_19" HREF="terminal_interface-curses-menus__ads.htm#ref_413_20">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> String
544    <b>is</b>
545       <b>function</b> <FONT COLOR=red><A NAME="ref_540_16">Get_Menu_Mark</A></FONT> (<FONT COLOR=red><A NAME="ref_540_31" HREF="terminal_interface-curses-menus__adb.htm#ref_540_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
546       <b>pragma</b> Import (C, Get_Menu_Mark, "menu_mark");
547    <b>begin</b>
548       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_121_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_540_16">Get_Menu_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_413_20">Men</A>));
549    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_413_14">Mark</A>;
550
551 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
552    <b>procedure</b> <FONT COLOR=red><A NAME="ref_547_14" HREF="terminal_interface-curses-menus__ads.htm#ref_423_14">Set_Foreground</A></FONT>
553      (<FONT COLOR=red><A NAME="ref_548_7" HREF="terminal_interface-curses-menus__ads.htm#ref_424_7">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
554       <FONT COLOR=red><A NAME="ref_549_7" HREF="terminal_interface-curses-menus__ads.htm#ref_425_7">Fore</A></FONT>  : <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#ref_350_4">Normal_Video</A>;
555       <FONT COLOR=red><A NAME="ref_550_7" HREF="terminal_interface-curses-menus__ads.htm#ref_426_7">Color</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>'First)
556    <b>is</b>
557       <b>function</b> <FONT COLOR=red><A NAME="ref_552_16">Set_Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="ref_552_31" HREF="terminal_interface-curses-menus__adb.htm#ref_552_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
558                               <FONT COLOR=red><A NAME="ref_553_31" HREF="terminal_interface-curses-menus__adb.htm#ref_552_16">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
559       <b>pragma</b> Import (C, Set_Menu_Fore, "set_menu_fore");
560
561       <FONT COLOR=red><A NAME="ref_556_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#ref_352_9">Attributed_Character</A> := (<A HREF="terminal_interface-curses__ads.htm#ref_356_10">Ch</A>    =&gt; Character'First,
562                                              <A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A> =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_426_7">Color</A>,
563                                              <A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_425_7">Fore</A>);
564       <FONT COLOR=red><A NAME="ref_559_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_552_16">Set_Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_424_7">Men</A>, AttrChar_To_Chtype (<A HREF="terminal_interface-curses-menus__adb.htm#ref_556_7">Ch</A>));
565    <b>begin</b>
566       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_559_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
567          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_559_7">Res</A>);
568       <b>end</b> <b>if</b>;
569    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_423_14">Set_Foreground</A>;
570
571    <b>procedure</b> <FONT COLOR=red><A NAME="ref_566_14" HREF="terminal_interface-curses-menus__ads.htm#ref_431_14">Foreground</A></FONT> (<FONT COLOR=red><A NAME="ref_566_26" HREF="terminal_interface-curses-menus__ads.htm#ref_431_26">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
572                          <FONT COLOR=red><A NAME="ref_567_26" HREF="terminal_interface-curses-menus__ads.htm#ref_432_26">Fore</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>)
573    <b>is</b>
574       <b>function</b> <FONT COLOR=red><A NAME="ref_569_16">Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="ref_569_27" HREF="terminal_interface-curses-menus__adb.htm#ref_569_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
575       <b>pragma</b> Import (C, Menu_Fore, "menu_fore");
576    <b>begin</b>
577       <A HREF="terminal_interface-curses-menus__ads.htm#ref_432_26">Fore</A> := Chtype_To_AttrChar (<A HREF="terminal_interface-curses-menus__adb.htm#ref_569_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_431_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
578    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_431_14">Foreground</A>;
579
580    <b>procedure</b> <FONT COLOR=red><A NAME="ref_575_14" HREF="terminal_interface-curses-menus__ads.htm#ref_436_14">Foreground</A></FONT> (<FONT COLOR=red><A NAME="ref_575_26" HREF="terminal_interface-curses-menus__ads.htm#ref_436_26">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
581                          <FONT COLOR=red><A NAME="ref_576_26" HREF="terminal_interface-curses-menus__ads.htm#ref_437_26">Fore</A></FONT>  : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>;
582                          <FONT COLOR=red><A NAME="ref_577_26" HREF="terminal_interface-curses-menus__ads.htm#ref_438_26">Color</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>)
583    <b>is</b>
584       <b>function</b> <FONT COLOR=red><A NAME="ref_579_16">Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="ref_579_27" HREF="terminal_interface-curses-menus__adb.htm#ref_579_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
585       <b>pragma</b> Import (C, Menu_Fore, "menu_fore");
586    <b>begin</b>
587       <A HREF="terminal_interface-curses-menus__ads.htm#ref_437_26">Fore</A>  := Chtype_To_AttrChar (<A HREF="terminal_interface-curses-menus__adb.htm#ref_579_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_436_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
588       <A HREF="terminal_interface-curses-menus__ads.htm#ref_438_26">Color</A> := Chtype_To_AttrChar (<A HREF="terminal_interface-curses-menus__adb.htm#ref_579_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_436_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A>;
589    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_436_14">Foreground</A>;
590
591    <b>procedure</b> <FONT COLOR=red><A NAME="ref_586_14" HREF="terminal_interface-curses-menus__ads.htm#ref_443_14">Set_Background</A></FONT>
592      (<FONT COLOR=red><A NAME="ref_587_7" HREF="terminal_interface-curses-menus__ads.htm#ref_444_7">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
593       <FONT COLOR=red><A NAME="ref_588_7" HREF="terminal_interface-curses-menus__ads.htm#ref_445_7">Back</A></FONT>  : <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#ref_350_4">Normal_Video</A>;
594       <FONT COLOR=red><A NAME="ref_589_7" HREF="terminal_interface-curses-menus__ads.htm#ref_446_7">Color</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>'First)
595    <b>is</b>
596       <b>function</b> <FONT COLOR=red><A NAME="ref_591_16">Set_Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="ref_591_31" HREF="terminal_interface-curses-menus__adb.htm#ref_591_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
597                               <FONT COLOR=red><A NAME="ref_592_31" HREF="terminal_interface-curses-menus__adb.htm#ref_591_16">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
598       <b>pragma</b> Import (C, Set_Menu_Back, "set_menu_back");
599
600       <FONT COLOR=red><A NAME="ref_595_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#ref_352_9">Attributed_Character</A> := (<A HREF="terminal_interface-curses__ads.htm#ref_356_10">Ch</A>    =&gt; Character'First,
601                                              <A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A> =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_446_7">Color</A>,
602                                              <A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_445_7">Back</A>);
603       <FONT COLOR=red><A NAME="ref_598_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_591_16">Set_Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_444_7">Men</A>, AttrChar_To_Chtype (<A HREF="terminal_interface-curses-menus__adb.htm#ref_595_7">Ch</A>));
604    <b>begin</b>
605       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_598_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
606          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_598_7">Res</A>);
607       <b>end</b> <b>if</b>;
608    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_443_14">Set_Background</A>;
609
610    <b>procedure</b> <FONT COLOR=red><A NAME="ref_605_14" HREF="terminal_interface-curses-menus__ads.htm#ref_451_14">Background</A></FONT> (<FONT COLOR=red><A NAME="ref_605_26" HREF="terminal_interface-curses-menus__ads.htm#ref_451_26">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
611                          <FONT COLOR=red><A NAME="ref_606_26" HREF="terminal_interface-curses-menus__ads.htm#ref_452_26">Back</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>)
612    <b>is</b>
613       <b>function</b> <FONT COLOR=red><A NAME="ref_608_16">Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="ref_608_27" HREF="terminal_interface-curses-menus__adb.htm#ref_608_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
614       <b>pragma</b> Import (C, Menu_Back, "menu_back");
615    <b>begin</b>
616       <A HREF="terminal_interface-curses-menus__ads.htm#ref_452_26">Back</A> := Chtype_To_AttrChar (<A HREF="terminal_interface-curses-menus__adb.htm#ref_608_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_451_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
617    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_451_14">Background</A>;
618
619    <b>procedure</b> <FONT COLOR=red><A NAME="ref_614_14" HREF="terminal_interface-curses-menus__ads.htm#ref_456_14">Background</A></FONT> (<FONT COLOR=red><A NAME="ref_614_26" HREF="terminal_interface-curses-menus__ads.htm#ref_456_26">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
620                          <FONT COLOR=red><A NAME="ref_615_26" HREF="terminal_interface-curses-menus__ads.htm#ref_457_26">Back</A></FONT>  : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>;
621                          <FONT COLOR=red><A NAME="ref_616_26" HREF="terminal_interface-curses-menus__ads.htm#ref_458_26">Color</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>)
622    <b>is</b>
623       <b>function</b> <FONT COLOR=red><A NAME="ref_618_16">Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="ref_618_27" HREF="terminal_interface-curses-menus__adb.htm#ref_618_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
624       <b>pragma</b> Import (C, Menu_Back, "menu_back");
625    <b>begin</b>
626       <A HREF="terminal_interface-curses-menus__ads.htm#ref_457_26">Back</A>  := <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_618_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_456_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
627       <A HREF="terminal_interface-curses-menus__ads.htm#ref_458_26">Color</A> := <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_618_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_456_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A>;
628    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_456_14">Background</A>;
629
630    <b>procedure</b> <FONT COLOR=red><A NAME="ref_625_14" HREF="terminal_interface-curses-menus__ads.htm#ref_463_14">Set_Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_625_24" HREF="terminal_interface-curses-menus__ads.htm#ref_464_7">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
631                        <FONT COLOR=red><A NAME="ref_626_24" HREF="terminal_interface-curses-menus__ads.htm#ref_465_7">Grey</A></FONT>  : <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#ref_350_4">Normal_Video</A>;
632                        <FONT COLOR=red><A NAME="ref_627_24" HREF="terminal_interface-curses-menus__ads.htm#ref_466_7">Color</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>'First)
633    <b>is</b>
634       <b>function</b> <FONT COLOR=red><A NAME="ref_629_16">Set_Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_629_31" HREF="terminal_interface-curses-menus__adb.htm#ref_629_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
635                               <FONT COLOR=red><A NAME="ref_630_31" HREF="terminal_interface-curses-menus__adb.htm#ref_629_16">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
636       <b>pragma</b> Import (C, Set_Menu_Grey, "set_menu_grey");
637
638       <FONT COLOR=red><A NAME="ref_633_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#ref_352_9">Attributed_Character</A> := (<A HREF="terminal_interface-curses__ads.htm#ref_356_10">Ch</A>    =&gt; Character'First,
639                                              <A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A> =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_466_7">Color</A>,
640                                              <A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_465_7">Grey</A>);
641
642       <FONT COLOR=red><A NAME="ref_637_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_629_16">Set_Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_464_7">Men</A>, AttrChar_To_Chtype (<A HREF="terminal_interface-curses-menus__adb.htm#ref_633_7">Ch</A>));
643    <b>begin</b>
644       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_637_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
645          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_637_7">Res</A>);
646       <b>end</b> <b>if</b>;
647    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_463_14">Set_Grey</A>;
648
649    <b>procedure</b> <FONT COLOR=red><A NAME="ref_644_14" HREF="terminal_interface-curses-menus__ads.htm#ref_471_14">Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_644_20" HREF="terminal_interface-curses-menus__ads.htm#ref_471_20">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
650                    <FONT COLOR=red><A NAME="ref_645_20" HREF="terminal_interface-curses-menus__ads.htm#ref_472_20">Grey</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>)
651    <b>is</b>
652       <b>function</b> <FONT COLOR=red><A NAME="ref_647_16">Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_647_27" HREF="terminal_interface-curses-menus__adb.htm#ref_647_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
653       <b>pragma</b> Import (C, Menu_Grey, "menu_grey");
654    <b>begin</b>
655       <A HREF="terminal_interface-curses-menus__ads.htm#ref_472_20">Grey</A> := <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_647_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_471_20">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
656    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_471_14">Grey</A>;
657
658    <b>procedure</b> <FONT COLOR=red><A NAME="ref_653_14" HREF="terminal_interface-curses-menus__ads.htm#ref_476_14">Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_653_20" HREF="terminal_interface-curses-menus__ads.htm#ref_477_7">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
659                    <FONT COLOR=red><A NAME="ref_654_20" HREF="terminal_interface-curses-menus__ads.htm#ref_478_7">Grey</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_307_9">Character_Attribute_Set</A>;
660                    <FONT COLOR=red><A NAME="ref_655_20" HREF="terminal_interface-curses-menus__ads.htm#ref_479_7">Color</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_299_9">Color_Pair</A>)
661    <b>is</b>
662       <b>function</b> <FONT COLOR=red><A NAME="ref_657_16">Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="ref_657_27" HREF="terminal_interface-curses-menus__adb.htm#ref_657_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_63_12">C_Chtype</A>;
663       <b>pragma</b> Import (C, Menu_Grey, "menu_grey");
664    <b>begin</b>
665       <A HREF="terminal_interface-curses-menus__ads.htm#ref_478_7">Grey</A>  := <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_657_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_477_7">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_354_10">Attr</A>;
666       <A HREF="terminal_interface-curses-menus__ads.htm#ref_479_7">Color</A> := <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_657_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_477_7">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#ref_355_10">Color</A>;
667    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_476_14">Grey</A>;
668
669    <b>procedure</b> <FONT COLOR=red><A NAME="ref_664_14" HREF="terminal_interface-curses-menus__ads.htm#ref_484_14">Set_Pad_Character</A></FONT> (<FONT COLOR=red><A NAME="ref_664_33" HREF="terminal_interface-curses-menus__ads.htm#ref_484_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
670                                 <FONT COLOR=red><A NAME="ref_665_33" HREF="terminal_interface-curses-menus__ads.htm#ref_485_33">Pad</A></FONT> : Character := Space)
671    <b>is</b>
672       <b>function</b> <FONT COLOR=red><A NAME="ref_667_16">Set_Menu_Pad</A></FONT> (<FONT COLOR=red><A NAME="ref_667_30" HREF="terminal_interface-curses-menus__adb.htm#ref_667_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
673                              <FONT COLOR=red><A NAME="ref_668_30" HREF="terminal_interface-curses-menus__adb.htm#ref_667_16">Ch</A></FONT>  : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
674       <b>pragma</b> Import (C, Set_Menu_Pad, "set_menu_pad");
675
676       <FONT COLOR=red><A NAME="ref_671_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_667_16">Set_Menu_Pad</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_484_33">Men</A>,
677                                                 <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (Character'Pos (<A HREF="terminal_interface-curses-menus__ads.htm#ref_485_33">Pad</A>)));
678    <b>begin</b>
679       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_671_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
680          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_671_7">Res</A>);
681       <b>end</b> <b>if</b>;
682    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_484_14">Set_Pad_Character</A>;
683
684    <b>procedure</b> <FONT COLOR=red><A NAME="ref_679_14" HREF="terminal_interface-curses-menus__ads.htm#ref_490_14">Pad_Character</A></FONT> (<FONT COLOR=red><A NAME="ref_679_29" HREF="terminal_interface-curses-menus__ads.htm#ref_490_29">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
685                             <FONT COLOR=red><A NAME="ref_680_29" HREF="terminal_interface-curses-menus__ads.htm#ref_491_29">Pad</A></FONT> : <b>out</b> Character)
686    <b>is</b>
687       <b>function</b> <FONT COLOR=red><A NAME="ref_682_16">Menu_Pad</A></FONT> (<FONT COLOR=red><A NAME="ref_682_26" HREF="terminal_interface-curses-menus__adb.htm#ref_682_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
688       <b>pragma</b> Import (C, Menu_Pad, "menu_pad");
689    <b>begin</b>
690       <A HREF="terminal_interface-curses-menus__ads.htm#ref_491_29">Pad</A> := Character'Val (<A HREF="terminal_interface-curses-menus__adb.htm#ref_682_16">Menu_Pad</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_490_29">Men</A>));
691    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_490_14">Pad_Character</A>;
692 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
693    <b>procedure</b> <FONT COLOR=red><A NAME="ref_688_14" HREF="terminal_interface-curses-menus__ads.htm#ref_500_14">Set_Spacing</A></FONT> (<FONT COLOR=red><A NAME="ref_688_27" HREF="terminal_interface-curses-menus__ads.htm#ref_500_27">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
694                           <FONT COLOR=red><A NAME="ref_689_27" HREF="terminal_interface-curses-menus__ads.htm#ref_501_27">Descr</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A> := 0;
695                           <FONT COLOR=red><A NAME="ref_690_27" HREF="terminal_interface-curses-menus__ads.htm#ref_502_27">Row</A></FONT>   : <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A>   := 0;
696                           <FONT COLOR=red><A NAME="ref_691_27" HREF="terminal_interface-curses-menus__ads.htm#ref_503_27">Col</A></FONT>   : <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A> := 0)
697    <b>is</b>
698       <b>function</b> <FONT COLOR=red><A NAME="ref_693_16">Set_Spacing</A></FONT> (<FONT COLOR=red><A NAME="ref_693_29" HREF="terminal_interface-curses-menus__adb.htm#ref_693_16">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
699                             <FONT COLOR=red><A NAME="ref_694_29" HREF="terminal_interface-curses-menus__adb.htm#ref_693_16">D</A></FONT>, <FONT COLOR=red><A NAME="ref_694_32" HREF="terminal_interface-curses-menus__adb.htm#ref_693_16">R</A></FONT>, <FONT COLOR=red><A NAME="ref_694_35" HREF="terminal_interface-curses-menus__adb.htm#ref_693_16">C</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
700       <b>pragma</b> Import (C, Set_Spacing, "set_menu_spacing");
701
702       <FONT COLOR=red><A NAME="ref_697_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_693_16">Set_Spacing</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_500_27">Men</A>,
703                                                <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_501_27">Descr</A>),
704                                                <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_502_27">Row</A>),
705                                                <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_503_27">Col</A>));
706    <b>begin</b>
707       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_697_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
708          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_697_7">Res</A>);
709       <b>end</b> <b>if</b>;
710    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_500_14">Set_Spacing</A>;
711
712    <b>procedure</b> <FONT COLOR=red><A NAME="ref_707_14" HREF="terminal_interface-curses-menus__ads.htm#ref_508_14">Spacing</A></FONT> (<FONT COLOR=red><A NAME="ref_707_23" HREF="terminal_interface-curses-menus__ads.htm#ref_508_23">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
713                       <FONT COLOR=red><A NAME="ref_708_23" HREF="terminal_interface-curses-menus__ads.htm#ref_509_23">Descr</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A>;
714                       <FONT COLOR=red><A NAME="ref_709_23" HREF="terminal_interface-curses-menus__ads.htm#ref_510_23">Row</A></FONT>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A>;
715                       <FONT COLOR=red><A NAME="ref_710_23" HREF="terminal_interface-curses-menus__ads.htm#ref_511_23">Col</A></FONT>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A>)
716    <b>is</b>
717       <b>type</b> <FONT COLOR=red><A NAME="ref_712_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
718       <b>function</b> <FONT COLOR=red><A NAME="ref_713_16">Get_Spacing</A></FONT> (<FONT COLOR=red><A NAME="ref_713_29" HREF="terminal_interface-curses-menus__adb.htm#ref_713_16">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
719                             <FONT COLOR=red><A NAME="ref_714_29" HREF="terminal_interface-curses-menus__adb.htm#ref_713_16">D</A></FONT>, <FONT COLOR=red><A NAME="ref_714_32" HREF="terminal_interface-curses-menus__adb.htm#ref_713_16">R</A></FONT>, <FONT COLOR=red><A NAME="ref_714_35" HREF="terminal_interface-curses-menus__adb.htm#ref_713_16">C</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_712_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
720       <b>pragma</b> Import (C, Get_Spacing, "menu_spacing");
721
722       <FONT COLOR=red><A NAME="ref_717_7">D</A></FONT>, <FONT COLOR=red><A NAME="ref_717_10">R</A></FONT>, <FONT COLOR=red><A NAME="ref_717_13">C</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
723       <FONT COLOR=red><A NAME="ref_718_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_713_16">Get_Spacing</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_508_23">Men</A>,
724                                                <A HREF="terminal_interface-curses-menus__adb.htm#ref_717_7">D</A>'<b>Access</b>,
725                                                <A HREF="terminal_interface-curses-menus__adb.htm#ref_717_10">R</A>'<b>Access</b>,
726                                                <A HREF="terminal_interface-curses-menus__adb.htm#ref_717_13">C</A>'<b>Access</b>);
727    <b>begin</b>
728       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_718_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
729          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_718_7">Res</A>);
730       <b>else</b>
731          <A HREF="terminal_interface-curses-menus__ads.htm#ref_509_23">Descr</A> := <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_717_7">D</A>);
732          <A HREF="terminal_interface-curses-menus__ads.htm#ref_510_23">Row</A>   := <A HREF="terminal_interface-curses__ads.htm#ref_60_9">Line_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_717_10">R</A>);
733          <A HREF="terminal_interface-curses-menus__ads.htm#ref_511_23">Col</A>   := <A HREF="terminal_interface-curses__ads.htm#ref_61_9">Column_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_717_13">C</A>);
734       <b>end</b> <b>if</b>;
735    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_508_14">Spacing</A>;
736 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
737    <b>function</b> <FONT COLOR=red><A NAME="ref_732_13" HREF="terminal_interface-curses-menus__ads.htm#ref_520_13">Set_Pattern</A></FONT> (<FONT COLOR=red><A NAME="ref_732_26" HREF="terminal_interface-curses-menus__ads.htm#ref_520_26">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
738                          <FONT COLOR=red><A NAME="ref_733_26" HREF="terminal_interface-curses-menus__ads.htm#ref_521_26">Text</A></FONT> : String) <b>return</b> Boolean
739    <b>is</b>
740       <b>type</b> <FONT COLOR=red><A NAME="ref_735_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#ref_38_9">Interfaces</A>.C.char;
741       <b>function</b> <FONT COLOR=red><A NAME="ref_736_16">Set_Pattern</A></FONT> (<FONT COLOR=red><A NAME="ref_736_29" HREF="terminal_interface-curses-menus__adb.htm#ref_736_16">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
742                             <FONT COLOR=red><A NAME="ref_737_29" HREF="terminal_interface-curses-menus__adb.htm#ref_736_16">Pattern</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_735_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
743       <b>pragma</b> Import (C, Set_Pattern, "set_menu_pattern");
744
745       <FONT COLOR=red><A NAME="ref_740_7">S</A></FONT>   : char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#ref_521_26">Text</A>'Length);
746       <FONT COLOR=red><A NAME="ref_741_7">L</A></FONT>   : size_t;
747       <FONT COLOR=red><A NAME="ref_742_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
748    <b>begin</b>
749       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#ref_521_26">Text</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_740_7">S</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_741_7">L</A>);
750       <A HREF="terminal_interface-curses-menus__adb.htm#ref_742_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_736_16">Set_Pattern</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_520_26">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_740_7">S</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_740_7">S</A>'First)'<b>Access</b>);
751       <b>case</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_742_7">Res</A> <b>is</b>
752          <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_89_4">E_No_Match</A> =&gt; <b>return</b> False;
753          <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A>       =&gt; <b>return</b> True;
754          <b>when</b> <b>others</b> =&gt;
755             <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_742_7">Res</A>);
756             <b>return</b> False;
757       <b>end</b> <b>case</b>;
758    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_520_13">Set_Pattern</A>;
759
760    <b>procedure</b> <FONT COLOR=red><A NAME="ref_755_14" HREF="terminal_interface-curses-menus__ads.htm#ref_527_14">Pattern</A></FONT> (<FONT COLOR=red><A NAME="ref_755_23" HREF="terminal_interface-curses-menus__ads.htm#ref_527_23">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
761                       <FONT COLOR=red><A NAME="ref_756_23" HREF="terminal_interface-curses-menus__ads.htm#ref_528_23">Text</A></FONT> : <b>out</b> String)
762    <b>is</b>
763       <b>function</b> <FONT COLOR=red><A NAME="ref_758_16">Get_Pattern</A></FONT> (<FONT COLOR=red><A NAME="ref_758_29" HREF="terminal_interface-curses-menus__adb.htm#ref_758_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_58_12">chars_ptr</A>;
764       <b>pragma</b> Import (C, Get_Pattern, "menu_pattern");
765    <b>begin</b>
766       <A HREF="terminal_interface-curses-aux__ads.htm#ref_116_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_758_16">Get_Pattern</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_527_23">Men</A>), <A HREF="terminal_interface-curses-menus__ads.htm#ref_528_23">Text</A>);
767    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_527_14">Pattern</A>;
768 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
769    <b>procedure</b> <FONT COLOR=red><A NAME="ref_764_14" HREF="terminal_interface-curses-menus__ads.htm#ref_537_14">Set_Format</A></FONT> (<FONT COLOR=red><A NAME="ref_764_26" HREF="terminal_interface-curses-menus__ads.htm#ref_537_26">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
770                          <FONT COLOR=red><A NAME="ref_765_26" HREF="terminal_interface-curses-menus__ads.htm#ref_538_26">Lines</A></FONT>   : <A HREF="terminal_interface-curses__ads.htm#ref_63_12">Line_Count</A>;
771                          <FONT COLOR=red><A NAME="ref_766_26" HREF="terminal_interface-curses-menus__ads.htm#ref_539_26">Columns</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_65_12">Column_Count</A>)
772    <b>is</b>
773       <b>function</b> <FONT COLOR=red><A NAME="ref_768_16">Set_Menu_Fmt</A></FONT> (<FONT COLOR=red><A NAME="ref_768_30" HREF="terminal_interface-curses-menus__adb.htm#ref_768_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
774                              <FONT COLOR=red><A NAME="ref_769_30" HREF="terminal_interface-curses-menus__adb.htm#ref_768_16">Lin</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
775                              <FONT COLOR=red><A NAME="ref_770_30" HREF="terminal_interface-curses-menus__adb.htm#ref_768_16">Col</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
776       <b>pragma</b> Import (C, Set_Menu_Fmt, "set_menu_format");
777
778       <FONT COLOR=red><A NAME="ref_773_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_768_16">Set_Menu_Fmt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_537_26">Men</A>,
779                                                 <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_538_26">Lines</A>),
780                                                 <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_539_26">Columns</A>));
781    <b>begin</b>
782       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_773_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
783          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_773_7">Res</A>);
784       <b>end</b> <b>if</b>;
785    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_537_14">Set_Format</A>;
786
787    <b>procedure</b> <FONT COLOR=red><A NAME="ref_782_14" HREF="terminal_interface-curses-menus__ads.htm#ref_551_14">Format</A></FONT> (<FONT COLOR=red><A NAME="ref_782_22" HREF="terminal_interface-curses-menus__ads.htm#ref_551_22">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
788                      <FONT COLOR=red><A NAME="ref_783_22" HREF="terminal_interface-curses-menus__ads.htm#ref_552_22">Lines</A></FONT>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_63_12">Line_Count</A>;
789                      <FONT COLOR=red><A NAME="ref_784_22" HREF="terminal_interface-curses-menus__ads.htm#ref_553_22">Columns</A></FONT> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#ref_65_12">Column_Count</A>)
790    <b>is</b>
791       <b>type</b> <FONT COLOR=red><A NAME="ref_786_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
792       <b>function</b> <FONT COLOR=red><A NAME="ref_787_16">Menu_Fmt</A></FONT> (<FONT COLOR=red><A NAME="ref_787_26" HREF="terminal_interface-curses-menus__adb.htm#ref_787_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
793                          <FONT COLOR=red><A NAME="ref_788_26" HREF="terminal_interface-curses-menus__adb.htm#ref_787_16">Y</A></FONT>, <FONT COLOR=red><A NAME="ref_788_29" HREF="terminal_interface-curses-menus__adb.htm#ref_787_16">X</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#ref_786_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
794       <b>pragma</b> Import (C, Menu_Fmt, "menu_format");
795
796       <FONT COLOR=red><A NAME="ref_791_7">L</A></FONT>, <FONT COLOR=red><A NAME="ref_791_10">C</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
797       <FONT COLOR=red><A NAME="ref_792_7">Res</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_787_16">Menu_Fmt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_551_22">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_791_7">L</A>'<b>Access</b>, <A HREF="terminal_interface-curses-menus__adb.htm#ref_791_10">C</A>'<b>Access</b>);
798    <b>begin</b>
799       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_792_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
800          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_792_7">Res</A>);
801       <b>else</b>
802          <A HREF="terminal_interface-curses-menus__ads.htm#ref_552_22">Lines</A>   := <A HREF="terminal_interface-curses__ads.htm#ref_63_12">Line_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_791_7">L</A>);
803          <A HREF="terminal_interface-curses-menus__ads.htm#ref_553_22">Columns</A> := <A HREF="terminal_interface-curses__ads.htm#ref_65_12">Column_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_791_10">C</A>);
804       <b>end</b> <b>if</b>;
805    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_551_14">Format</A>;
806 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
807    <b>procedure</b> <FONT COLOR=red><A NAME="ref_802_14" HREF="terminal_interface-curses-menus__ads.htm#ref_565_14">Set_Item_Init_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_802_34" HREF="terminal_interface-curses-menus__ads.htm#ref_565_34">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
808                                  <FONT COLOR=red><A NAME="ref_803_34" HREF="terminal_interface-curses-menus__ads.htm#ref_566_34">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>)
809    <b>is</b>
810       <b>function</b> <FONT COLOR=red><A NAME="ref_805_16">Set_Item_Init</A></FONT> (<FONT COLOR=red><A NAME="ref_805_31" HREF="terminal_interface-curses-menus__adb.htm#ref_805_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
811                               <FONT COLOR=red><A NAME="ref_806_31" HREF="terminal_interface-curses-menus__adb.htm#ref_805_16">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
812       <b>pragma</b> Import (C, Set_Item_Init, "set_item_init");
813
814       <FONT COLOR=red><A NAME="ref_809_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_805_16">Set_Item_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_565_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_566_34">Proc</A>);
815    <b>begin</b>
816       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_809_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
817          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_809_7">Res</A>);
818       <b>end</b> <b>if</b>;
819    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_565_14">Set_Item_Init_Hook</A>;
820
821    <b>procedure</b> <FONT COLOR=red><A NAME="ref_816_14" HREF="terminal_interface-curses-menus__ads.htm#ref_571_14">Set_Item_Term_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_816_34" HREF="terminal_interface-curses-menus__ads.htm#ref_571_34">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
822                                  <FONT COLOR=red><A NAME="ref_817_34" HREF="terminal_interface-curses-menus__ads.htm#ref_572_34">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>)
823    <b>is</b>
824       <b>function</b> <FONT COLOR=red><A NAME="ref_819_16">Set_Item_Term</A></FONT> (<FONT COLOR=red><A NAME="ref_819_31" HREF="terminal_interface-curses-menus__adb.htm#ref_819_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
825                               <FONT COLOR=red><A NAME="ref_820_31" HREF="terminal_interface-curses-menus__adb.htm#ref_819_16">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
826       <b>pragma</b> Import (C, Set_Item_Term, "set_item_term");
827
828       <FONT COLOR=red><A NAME="ref_823_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_819_16">Set_Item_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_571_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_572_34">Proc</A>);
829    <b>begin</b>
830       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_823_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
831          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_823_7">Res</A>);
832       <b>end</b> <b>if</b>;
833    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_571_14">Set_Item_Term_Hook</A>;
834
835    <b>procedure</b> <FONT COLOR=red><A NAME="ref_830_14" HREF="terminal_interface-curses-menus__ads.htm#ref_577_14">Set_Menu_Init_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_830_34" HREF="terminal_interface-curses-menus__ads.htm#ref_577_34">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
836                                  <FONT COLOR=red><A NAME="ref_831_34" HREF="terminal_interface-curses-menus__ads.htm#ref_578_34">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>)
837    <b>is</b>
838       <b>function</b> <FONT COLOR=red><A NAME="ref_833_16">Set_Menu_Init</A></FONT> (<FONT COLOR=red><A NAME="ref_833_31" HREF="terminal_interface-curses-menus__adb.htm#ref_833_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
839                               <FONT COLOR=red><A NAME="ref_834_31" HREF="terminal_interface-curses-menus__adb.htm#ref_833_16">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
840       <b>pragma</b> Import (C, Set_Menu_Init, "set_menu_init");
841
842       <FONT COLOR=red><A NAME="ref_837_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_833_16">Set_Menu_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_577_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_578_34">Proc</A>);
843    <b>begin</b>
844       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_837_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
845          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_837_7">Res</A>);
846       <b>end</b> <b>if</b>;
847    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_577_14">Set_Menu_Init_Hook</A>;
848
849    <b>procedure</b> <FONT COLOR=red><A NAME="ref_844_14" HREF="terminal_interface-curses-menus__ads.htm#ref_583_14">Set_Menu_Term_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_844_34" HREF="terminal_interface-curses-menus__ads.htm#ref_583_34">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
850                                  <FONT COLOR=red><A NAME="ref_845_34" HREF="terminal_interface-curses-menus__ads.htm#ref_584_34">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>)
851    <b>is</b>
852       <b>function</b> <FONT COLOR=red><A NAME="ref_847_16">Set_Menu_Term</A></FONT> (<FONT COLOR=red><A NAME="ref_847_31" HREF="terminal_interface-curses-menus__adb.htm#ref_847_16">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
853                               <FONT COLOR=red><A NAME="ref_848_31" HREF="terminal_interface-curses-menus__adb.htm#ref_847_16">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
854       <b>pragma</b> Import (C, Set_Menu_Term, "set_menu_term");
855
856       <FONT COLOR=red><A NAME="ref_851_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_847_16">Set_Menu_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_583_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_584_34">Proc</A>);
857    <b>begin</b>
858       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_851_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
859          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_851_7">Res</A>);
860       <b>end</b> <b>if</b>;
861    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_583_14">Set_Menu_Term_Hook</A>;
862
863    <b>function</b> <FONT COLOR=red><A NAME="ref_858_13" HREF="terminal_interface-curses-menus__ads.htm#ref_589_13">Get_Item_Init_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_858_33" HREF="terminal_interface-curses-menus__ads.htm#ref_589_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>
864    <b>is</b>
865       <b>function</b> <FONT COLOR=red><A NAME="ref_860_16">Item_Init</A></FONT> (<FONT COLOR=red><A NAME="ref_860_27" HREF="terminal_interface-curses-menus__adb.htm#ref_860_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>;
866       <b>pragma</b> Import (C, Item_Init, "item_init");
867    <b>begin</b>
868       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_860_16">Item_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_589_33">Men</A>);
869    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_589_13">Get_Item_Init_Hook</A>;
870
871    <b>function</b> <FONT COLOR=red><A NAME="ref_866_13" HREF="terminal_interface-curses-menus__ads.htm#ref_594_13">Get_Item_Term_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_866_33" HREF="terminal_interface-curses-menus__ads.htm#ref_594_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>
872    <b>is</b>
873       <b>function</b> <FONT COLOR=red><A NAME="ref_868_16">Item_Term</A></FONT> (<FONT COLOR=red><A NAME="ref_868_27" HREF="terminal_interface-curses-menus__adb.htm#ref_868_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>;
874       <b>pragma</b> Import (C, Item_Term, "item_term");
875    <b>begin</b>
876       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_868_16">Item_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_594_33">Men</A>);
877    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_594_13">Get_Item_Term_Hook</A>;
878
879    <b>function</b> <FONT COLOR=red><A NAME="ref_874_13" HREF="terminal_interface-curses-menus__ads.htm#ref_599_13">Get_Menu_Init_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_874_33" HREF="terminal_interface-curses-menus__ads.htm#ref_599_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>
880    <b>is</b>
881       <b>function</b> <FONT COLOR=red><A NAME="ref_876_16">Menu_Init</A></FONT> (<FONT COLOR=red><A NAME="ref_876_27" HREF="terminal_interface-curses-menus__adb.htm#ref_876_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>;
882       <b>pragma</b> Import (C, Menu_Init, "menu_init");
883    <b>begin</b>
884       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_876_16">Menu_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_599_33">Men</A>);
885    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_599_13">Get_Menu_Init_Hook</A>;
886
887    <b>function</b> <FONT COLOR=red><A NAME="ref_882_13" HREF="terminal_interface-curses-menus__ads.htm#ref_604_13">Get_Menu_Term_Hook</A></FONT> (<FONT COLOR=red><A NAME="ref_882_33" HREF="terminal_interface-curses-menus__ads.htm#ref_604_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>
888    <b>is</b>
889       <b>function</b> <FONT COLOR=red><A NAME="ref_884_16">Menu_Term</A></FONT> (<FONT COLOR=red><A NAME="ref_884_27" HREF="terminal_interface-curses-menus__adb.htm#ref_884_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_561_9">Menu_Hook_Function</A>;
890       <b>pragma</b> Import (C, Menu_Term, "menu_term");
891    <b>begin</b>
892       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_884_16">Menu_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_604_33">Men</A>);
893    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_604_13">Get_Menu_Term_Hook</A>;
894 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
895    <b>procedure</b> <FONT COLOR=red><A NAME="ref_890_14" HREF="terminal_interface-curses-menus__ads.htm#ref_613_14">Redefine</A></FONT> (<FONT COLOR=red><A NAME="ref_890_24" HREF="terminal_interface-curses-menus__ads.htm#ref_613_24">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
896                        <FONT COLOR=red><A NAME="ref_891_24" HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_178_9">Item_Array_Access</A>)
897    <b>is</b>
898       <b>function</b> <FONT COLOR=red><A NAME="ref_893_16">Set_Items</A></FONT> (<FONT COLOR=red><A NAME="ref_893_27" HREF="terminal_interface-curses-menus__adb.htm#ref_893_16">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
899                           <FONT COLOR=red><A NAME="ref_894_27" HREF="terminal_interface-curses-menus__adb.htm#ref_893_16">Items</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
900       <b>pragma</b> Import (C, Set_Items, "set_menu_items");
901
902       <FONT COLOR=red><A NAME="ref_897_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
903    <b>begin</b>
904       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A>'Last) = <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>);
905       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A>'Last) /= <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A> <b>then</b>
906          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
907       <b>else</b>
908          <A HREF="terminal_interface-curses-menus__adb.htm#ref_897_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_893_16">Set_Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_613_24">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#ref_614_24">Items</A>.<b>all</b>'Address);
909          <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#ref_897_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
910             <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_897_7">Res</A>);
911          <b>end</b> <b>if</b>;
912       <b>end</b> <b>if</b>;
913    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_613_14">Redefine</A>;
914
915    <b>function</b> <FONT COLOR=red><A NAME="ref_910_13" HREF="terminal_interface-curses-menus__ads.htm#ref_629_13">Item_Count</A></FONT> (<FONT COLOR=red><A NAME="ref_910_25" HREF="terminal_interface-curses-menus__ads.htm#ref_629_25">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> Natural
916    <b>is</b>
917       <b>function</b> <FONT COLOR=red><A NAME="ref_912_16">Count</A></FONT> (<FONT COLOR=red><A NAME="ref_912_23" HREF="terminal_interface-curses-menus__adb.htm#ref_912_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
918       <b>pragma</b> Import (C, Count, "item_count");
919    <b>begin</b>
920       <b>return</b> Natural (<A HREF="terminal_interface-curses-menus__adb.htm#ref_912_16">Count</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_629_25">Men</A>));
921    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_629_13">Item_Count</A>;
922
923    <b>function</b> <FONT COLOR=red><A NAME="ref_918_13" HREF="terminal_interface-curses-menus__ads.htm#ref_623_13">Items</A></FONT> (<FONT COLOR=red><A NAME="ref_918_20" HREF="terminal_interface-curses-menus__ads.htm#ref_623_20">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
924                    <FONT COLOR=red><A NAME="ref_919_20" HREF="terminal_interface-curses-menus__ads.htm#ref_624_20">Index</A></FONT> : Positive) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_56_9">Item</A>
925    <b>is</b>
926       <b>use</b> I_Array;
927
928       <b>function</b> C_Mitems (<FONT COLOR=red><A NAME="ref_923_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> Pointer;
929       <b>pragma</b> Import (C, C_Mitems, "menu_items");
930
931       P : Pointer := C_Mitems (<A HREF="terminal_interface-curses-menus__ads.htm#ref_623_20">Men</A>);
932    <b>begin</b>
933       <b>if</b> P = <b>null</b> <b>or</b> <b>else</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_624_20">Index</A> &gt; <A HREF="terminal_interface-curses-menus__ads.htm#ref_629_13">Item_Count</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_623_20">Men</A>) <b>then</b>
934          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
935       <b>else</b>
936          P := P + ptrdiff_t (<A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_624_20">Index</A>) - 1);
937          <b>return</b> P.<b>all</b>;
938       <b>end</b> <b>if</b>;
939    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_623_13">Items</A>;
940
941 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
942    <b>function</b> <FONT COLOR=red><A NAME="ref_937_13" HREF="terminal_interface-curses-menus__ads.htm#ref_638_13">Create</A></FONT> (<FONT COLOR=red><A NAME="ref_937_21" HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_178_9">Item_Array_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>
943    <b>is</b>
944       <b>function</b> <FONT COLOR=red><A NAME="ref_939_16">Newmenu</A></FONT> (<FONT COLOR=red><A NAME="ref_939_25" HREF="terminal_interface-curses-menus__adb.htm#ref_939_16">Items</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
945       <b>pragma</b> Import (C, Newmenu, "new_menu");
946
947       <FONT COLOR=red><A NAME="ref_942_7">M</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
948    <b>begin</b>
949       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A>'Last) = <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>);
950       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A>'Last) /= <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A> <b>then</b>
951          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
952       <b>else</b>
953          <A HREF="terminal_interface-curses-menus__adb.htm#ref_942_7">M</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_939_16">Newmenu</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_638_21">Items</A>.<b>all</b>'Address);
954          <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_942_7">M</A> = <A HREF="terminal_interface-curses-menus__ads.htm#ref_63_4">Null_Menu</A> <b>then</b>
955             <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_116_4">Menu_Exception</A>;
956          <b>end</b> <b>if</b>;
957          <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_942_7">M</A>;
958       <b>end</b> <b>if</b>;
959    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_638_13">Create</A>;
960
961    <b>procedure</b> <FONT COLOR=red><A NAME="ref_956_14" HREF="terminal_interface-curses-menus__ads.htm#ref_645_14">Delete</A></FONT> (<FONT COLOR=red><A NAME="ref_956_22" HREF="terminal_interface-curses-menus__ads.htm#ref_645_22">Men</A></FONT> : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>)
962    <b>is</b>
963       <b>function</b> <FONT COLOR=red><A NAME="ref_958_16">Free</A></FONT> (<FONT COLOR=red><A NAME="ref_958_22" HREF="terminal_interface-curses-menus__adb.htm#ref_958_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
964       <b>pragma</b> Import (C, Free, "free_menu");
965
966       <FONT COLOR=red><A NAME="ref_961_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_958_16">Free</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_645_22">Men</A>);
967    <b>begin</b>
968       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_961_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
969          <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_961_7">Res</A>);
970       <b>end</b> <b>if</b>;
971       <A HREF="terminal_interface-curses-menus__ads.htm#ref_645_22">Men</A> := <A HREF="terminal_interface-curses-menus__ads.htm#ref_63_4">Null_Menu</A>;
972    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_645_14">Delete</A>;
973
974 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
975    <b>function</b> <FONT COLOR=red><A NAME="ref_970_13" HREF="terminal_interface-curses-menus__ads.htm#ref_660_13">Driver</A></FONT> (<FONT COLOR=red><A NAME="ref_970_21" HREF="terminal_interface-curses-menus__ads.htm#ref_660_21">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
976                     <FONT COLOR=red><A NAME="ref_971_21" HREF="terminal_interface-curses-menus__ads.htm#ref_661_21">Key</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#ref_68_9">Key_Code</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_654_9">Driver_Result</A>
977    <b>is</b>
978       <b>function</b> <FONT COLOR=red><A NAME="ref_973_16">Driver</A></FONT> (<FONT COLOR=red><A NAME="ref_973_24" HREF="terminal_interface-curses-menus__adb.htm#ref_973_16">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#ref_57_9">Menu</A>;
979                        <FONT COLOR=red><A NAME="ref_974_24" HREF="terminal_interface-curses-menus__adb.htm#ref_973_16">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A>;
980       <b>pragma</b> Import (C, Driver, "menu_driver");
981
982       <FONT COLOR=red><A NAME="ref_977_7">R</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#ref_973_16">Driver</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_660_21">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#ref_55_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_661_21">Key</A>));
983    <b>begin</b>
984       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_977_7">R</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
985          <b>case</b> <A HREF="terminal_interface-curses-menus__adb.htm#ref_977_7">R</A> <b>is</b>
986             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_88_4">E_Unknown_Command</A>  =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_656_27">Unknown_Request</A>;
987             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_89_4">E_No_Match</A>         =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_657_27">No_Match</A>;
988             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#ref_92_4">E_Request_Denied</A> |
989                  <A HREF="terminal_interface-curses-aux__ads.htm#ref_90_4">E_Not_Selectable</A>   =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_655_27">Request_Denied</A>;
990             <b>when</b> <b>others</b> =&gt;
991                <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_977_7">R</A>);
992          <b>end</b> <b>case</b>;
993       <b>end</b> <b>if</b>;
994       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_654_27">Menu_Ok</A>;
995    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_660_13">Driver</A>;
996
997    <b>procedure</b> <FONT COLOR=red><A NAME="ref_992_14" HREF="terminal_interface-curses-menus__ads.htm#ref_180_14">Free</A></FONT> (<FONT COLOR=red><A NAME="ref_992_20" HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A></FONT>         : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_178_9">Item_Array_Access</A>;
998                    <FONT COLOR=red><A NAME="ref_993_20" HREF="terminal_interface-curses-menus__ads.htm#ref_181_20">Free_Items</A></FONT> : Boolean := False)
999    <b>is</b>
1000       <b>procedure</b> Release <b>is</b> <b>new</b> Ada.Unchecked_Deallocation
1001         (Item_Array, <A HREF="terminal_interface-curses-menus__ads.htm#ref_178_9">Item_Array_Access</A>);
1002    <b>begin</b>
1003       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_181_20">Free_Items</A> <b>then</b>
1004          <b>for</b> <FONT COLOR=red><A NAME="ref_999_14">I</A></FONT> <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A>'First .. (<A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A>'Last - 1) <b>loop</b>
1005             <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_999_14">I</A>) /= <A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A> <b>then</b>
1006                <A HREF="terminal_interface-curses-menus__ads.htm#ref_203_14">Delete</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A> (<A HREF="terminal_interface-curses-menus__adb.htm#ref_999_14">I</A>));
1007             <b>end</b> <b>if</b>;
1008          <b>end</b> <b>loop</b>;
1009       <b>end</b> <b>if</b>;
1010       Release (<A HREF="terminal_interface-curses-menus__ads.htm#ref_180_20">IA</A>);
1011    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_180_14">Free</A>;
1012
1013 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
1014    <b>function</b> <FONT COLOR=red><A NAME="ref_1009_13" HREF="terminal_interface-curses-menus__ads.htm#ref_146_13">Default_Menu_Options</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_121_9">Menu_Option_Set</A>
1015    <b>is</b>
1016    <b>begin</b>
1017       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_352_13">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_63_4">Null_Menu</A>);
1018    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_146_13">Default_Menu_Options</A>;
1019
1020    <b>function</b> <FONT COLOR=red><A NAME="ref_1015_13" HREF="terminal_interface-curses-menus__ads.htm#ref_168_13">Default_Item_Options</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_153_9">Item_Option_Set</A>
1021    <b>is</b>
1022    <b>begin</b>
1023       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_256_13">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#ref_62_4">Null_Item</A>);
1024    <b>end</b> <A HREF="terminal_interface-curses-menus__ads.htm#ref_168_13">Default_Item_Options</A>;
1025 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
1026
1027 <b>end</b> <A HREF="terminal_interface__ads.htm#ref_42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#ref_49_28">Curses</A>.<A HREF="terminal_interface-curses-menus__ads.htm#ref_49_35">Menus</A>;
1028 </PRE></BODY></HTML>