ncurses 5.3
[ncurses.git] / doc / html / ada / terminal_interface-curses-menus__adb.htm
1 <HTML><HEAD><TITLE>terminal_interface-curses-menus.adb</TITLE></HEAD>
2 <BODY>
3 <HR><DIV ALIGN="center"><H1> File : terminal_interface-curses-menus.adb </H1></DIV><HR>
4 <PRE>
5 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
6 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
7 <FONT COLOR=green><EM>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</EM></FONT>
8 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
9 <FONT COLOR=green><EM>--                      Terminal_Interface.Curses.Menus                     --</EM></FONT>
10 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
11 <FONT COLOR=green><EM>--                                 B O D Y                                  --</EM></FONT>
12 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
13 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
14 <FONT COLOR=green><EM>-- Copyright (c) 1998 Free Software Foundation, Inc.                        --</EM></FONT>
15 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
16 <FONT COLOR=green><EM>-- Permission is hereby granted, free of charge, to any person obtaining a  --</EM></FONT>
17 <FONT COLOR=green><EM>-- copy of this software and associated documentation files (the            --</EM></FONT>
18 <FONT COLOR=green><EM>-- "Software"), to deal in the Software without restriction, including      --</EM></FONT>
19 <FONT COLOR=green><EM>-- without limitation the rights to use, copy, modify, merge, publish,      --</EM></FONT>
20 <FONT COLOR=green><EM>-- distribute, distribute with modifications, sublicense, and/or sell       --</EM></FONT>
21 <FONT COLOR=green><EM>-- copies of the Software, and to permit persons to whom the Software is    --</EM></FONT>
22 <FONT COLOR=green><EM>-- furnished to do so, subject to the following conditions:                 --</EM></FONT>
23 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
24 <FONT COLOR=green><EM>-- The above copyright notice and this permission notice shall be included  --</EM></FONT>
25 <FONT COLOR=green><EM>-- in all copies or substantial portions of the Software.                   --</EM></FONT>
26 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
27 <FONT COLOR=green><EM>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</EM></FONT>
28 <FONT COLOR=green><EM>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</EM></FONT>
29 <FONT COLOR=green><EM>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</EM></FONT>
30 <FONT COLOR=green><EM>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</EM></FONT>
31 <FONT COLOR=green><EM>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</EM></FONT>
32 <FONT COLOR=green><EM>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</EM></FONT>
33 <FONT COLOR=green><EM>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</EM></FONT>
34 <FONT COLOR=green><EM>--                                                                          --</EM></FONT>
35 <FONT COLOR=green><EM>-- Except as contained in this notice, the name(s) of the above copyright   --</EM></FONT>
36 <FONT COLOR=green><EM>-- holders shall not be used in advertising or otherwise to promote the     --</EM></FONT>
37 <FONT COLOR=green><EM>-- sale, use or other dealings in this Software without prior written       --</EM></FONT>
38 <FONT COLOR=green><EM>-- authorization.                                                           --</EM></FONT>
39 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
40 <FONT COLOR=green><EM>--  Author:  <A HREF="http://www.familiepfeifer.de/juergen">J&uuml;rgen Pfeifer</A>, 1996</EM></FONT>
41 <FONT COLOR=green><EM>--  Contact: <A HREF="http://www.familiepfeifer.de/Contact.aspx?Lang=en">www.familiepfeifer.de/Contact.aspx?Lang=en</A></EM></FONT>
42 <FONT COLOR=green><EM>--  Version Control:</EM></FONT>
43 <FONT COLOR=green><EM>--  @Revision: 1.21 @</EM></FONT>
44 <FONT COLOR=green><EM>--  Binding Version 01.00</EM></FONT>
45 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
46 <b>with</b> Ada.Unchecked_Deallocation;
47 <b>with</b> <A HREF="terminal_interface__ads.htm#42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#51_35">Aux</A>; <b>use</b> <A HREF="terminal_interface__ads.htm#42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#49_28">Curses</A>.<A HREF="terminal_interface-curses-aux__ads.htm#51_35">Aux</A>;
48
49 <b>with</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C; <b>use</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C;
50 <b>with</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Strings; <b>use</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Strings;
51 <b>with</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Pointers;
52
53 <b>with</b> Ada.Unchecked_Conversion;
54
55 <b>package</b> <b>body</b> <A HREF="terminal_interface__ads.htm#42_9">Terminal_Interface</A>.<A HREF="terminal_interface-curses__ads.htm#49_28">Curses</A>.<A HREF="terminal_interface-curses-menus__ads.htm#49_35">Menus</A><FONT COLOR=red><A NAME="51_40"></A></FONT> <b>is</b>
56
57    <b>type</b> <FONT COLOR=red><A NAME="53_9">C_Item_Array</A></FONT> <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#56_9">Item</A>;
58    <b>package</b> <FONT COLOR=red><A NAME="54_12">I_Array</A></FONT> <b>is</b> <b>new</b>
59      <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Pointers (Natural, <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>, <A HREF="terminal_interface-curses-menus__adb.htm#53_9">C_Item_Array</A>, <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>);
60
61    <b>use</b> <b>type</b> System.Bit_Order;
62    <b>subtype</b> <FONT COLOR=red><A NAME="58_12">chars_ptr</A></FONT> <b>is</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Strings.chars_ptr;
63
64    <b>function</b> <FONT COLOR=red><A NAME="60_13">MOS_2_CInt</A></FONT> <b>is</b> <b>new</b>
65      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>,
66                                <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>);
67
68    <b>function</b> <FONT COLOR=red><A NAME="64_13">CInt_2_MOS</A></FONT> <b>is</b> <b>new</b>
69      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>,
70                                <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>);
71
72    <b>function</b> <FONT COLOR=red><A NAME="68_13">IOS_2_CInt</A></FONT> <b>is</b> <b>new</b>
73      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>,
74                                <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>);
75
76    <b>function</b> <FONT COLOR=red><A NAME="72_13">CInt_2_IOS</A></FONT> <b>is</b> <b>new</b>
77      Ada.Unchecked_Conversion (<A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>,
78                                <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>);
79
80 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
81    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#106_14">Request_Name</A><FONT COLOR=red><A NAME="77_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#106_28">Key</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#65_12">Menu_Request_Code</A>;
82                            <A HREF="terminal_interface-curses-menus__ads.htm#107_28">Name</A> : <b>out</b> String)
83    <b>is</b>
84       <b>function</b> <FONT COLOR=red><A NAME="80_16">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="80_30">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
85       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#80_16">Request_Name</A>, "menu_request_name");
86    <b>begin</b>
87       <A HREF="terminal_interface-curses-aux__ads.htm#117_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#80_16">Request_Name</A> (<A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#106_28">Key</A>)), <A HREF="terminal_interface-curses-menus__ads.htm#107_28">Name</A>);
88    <b>end</b> Request_Name;
89
90    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#109_14">Request_Name</A><FONT COLOR=red><A NAME="86_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#109_28">Key</A> : <A HREF="terminal_interface-curses-menus__ads.htm#65_12">Menu_Request_Code</A>) <b>return</b> String
91    <b>is</b>
92       <b>function</b> <FONT COLOR=red><A NAME="88_16">Request_Name</A></FONT> (<FONT COLOR=red><A NAME="88_30">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
93       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#88_16">Request_Name</A>, "menu_request_name");
94    <b>begin</b>
95       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#122_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#88_16">Request_Name</A> (<A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#109_28">Key</A>)));
96    <b>end</b> Request_Name;
97
98    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#193_13">Create</A><FONT COLOR=red><A NAME="94_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#193_21">Name</A>        : String;
99                     <A HREF="terminal_interface-curses-menus__ads.htm#194_21">Description</A> : String := "") <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>
100    <b>is</b>
101       <b>type</b> <FONT COLOR=red><A NAME="97_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.char;
102       <b>function</b> <FONT COLOR=red><A NAME="98_16">Newitem</A></FONT> (<FONT COLOR=red><A NAME="98_25">Name</A></FONT>, <FONT COLOR=red><A NAME="98_31">Desc</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#97_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
103       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#98_16">Newitem</A>, "new_item");
104
105       <b>type</b> <FONT COLOR=red><A NAME="101_12">Name_String</A></FONT> <b>is</b> <b>new</b> char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#193_21">Name</A>'Length);
106       <b>type</b> <FONT COLOR=red><A NAME="102_12">Name_String_Ptr</A></FONT> <b>is</b> <b>access</b> <A HREF="terminal_interface-curses-menus__adb.htm#101_12">Name_String</A>;
107       <b>pragma</b> Controlled (<A HREF="terminal_interface-curses-menus__adb.htm#102_12">Name_String_Ptr</A>);
108
109       <b>type</b> <FONT COLOR=red><A NAME="105_12">Desc_String</A></FONT> <b>is</b> <b>new</b> char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#194_21">Description</A>'Length);
110       <b>type</b> <FONT COLOR=red><A NAME="106_12">Desc_String_Ptr</A></FONT> <b>is</b> <b>access</b> <A HREF="terminal_interface-curses-menus__adb.htm#105_12">Desc_String</A>;
111       <b>pragma</b> Controlled (<A HREF="terminal_interface-curses-menus__adb.htm#106_12">Desc_String_Ptr</A>);
112
113       <FONT COLOR=red><A NAME="109_7">Name_Str</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#102_12">Name_String_Ptr</A> := <b>new</b> <A HREF="terminal_interface-curses-menus__adb.htm#101_12">Name_String</A>;
114       <FONT COLOR=red><A NAME="110_7">Desc_Str</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#106_12">Desc_String_Ptr</A> := <b>new</b> <A HREF="terminal_interface-curses-menus__adb.htm#105_12">Desc_String</A>;
115       <FONT COLOR=red><A NAME="111_7">Name_Len</A></FONT>, <FONT COLOR=red><A NAME="111_17">Desc_Len</A></FONT> : size_t;
116       <FONT COLOR=red><A NAME="112_7">Result</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
117    <b>begin</b>
118       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#193_21">Name</A>, <A HREF="terminal_interface-curses-menus__adb.htm#109_7">Name_Str</A>.<b>all</b>, <A HREF="terminal_interface-curses-menus__adb.htm#111_7">Name_Len</A>);
119       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#194_21">Description</A>, <A HREF="terminal_interface-curses-menus__adb.htm#110_7">Desc_Str</A>.<b>all</b>, <A HREF="terminal_interface-curses-menus__adb.htm#111_17">Desc_Len</A>);
120       <A HREF="terminal_interface-curses-menus__adb.htm#112_7">Result</A> := <A HREF="terminal_interface-curses-menus__adb.htm#98_16">Newitem</A> (<A HREF="terminal_interface-curses-menus__adb.htm#109_7">Name_Str</A>.<b>all</b> (<A HREF="terminal_interface-curses-menus__adb.htm#109_7">Name_Str</A>.<b>all</b>'First)'<b>Access</b>,
121                          <A HREF="terminal_interface-curses-menus__adb.htm#110_7">Desc_Str</A>.<b>all</b> (<A HREF="terminal_interface-curses-menus__adb.htm#110_7">Desc_Str</A>.<b>all</b>'First)'<b>Access</b>);
122       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#112_7">Result</A> = <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A> <b>then</b>
123          <b>raise</b> <A HREF="terminal_interface-curses__ads.htm#389_4">Eti_System_Error</A>;
124       <b>end</b> <b>if</b>;
125       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#112_7">Result</A>;
126    <b>end</b> Create;
127
128    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#205_14">Delete</A><FONT COLOR=red><A NAME="124_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#205_22">Itm</A> : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>)
129    <b>is</b>
130       <b>function</b> <FONT COLOR=red><A NAME="126_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="126_26">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
131       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#126_16">Descname</A>, "item_description");
132       <b>function</b> <FONT COLOR=red><A NAME="128_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="128_26">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
133       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#128_16">Itemname</A>, "item_name");
134
135       <b>function</b> <FONT COLOR=red><A NAME="131_16">Freeitem</A></FONT> (<FONT COLOR=red><A NAME="131_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
136       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#131_16">Freeitem</A>, "free_item");
137
138       <FONT COLOR=red><A NAME="134_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
139       <FONT COLOR=red><A NAME="135_7">Ptr</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
140    <b>begin</b>
141       <A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A> := <A HREF="terminal_interface-curses-menus__adb.htm#126_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#205_22">Itm</A>);
142       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A> /= Null_Ptr <b>then</b>
143          <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Strings.Free (<A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A>);
144       <b>end</b> <b>if</b>;
145       <A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A> := <A HREF="terminal_interface-curses-menus__adb.htm#128_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#205_22">Itm</A>);
146       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A> /= Null_Ptr <b>then</b>
147          <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.Strings.Free (<A HREF="terminal_interface-curses-menus__adb.htm#135_7">Ptr</A>);
148       <b>end</b> <b>if</b>;
149       <A HREF="terminal_interface-curses-menus__adb.htm#134_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#131_16">Freeitem</A> (<A HREF="terminal_interface-curses-menus__ads.htm#205_22">Itm</A>);
150       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#134_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
151          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#134_7">Res</A>);
152       <b>end</b> <b>if</b>;
153       <A HREF="terminal_interface-curses-menus__ads.htm#205_22">Itm</A> := <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>;
154    <b>end</b> Delete;
155 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
156    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#214_14">Set_Value</A><FONT COLOR=red><A NAME="152_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#214_25">Itm</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
157                         <A HREF="terminal_interface-curses-menus__ads.htm#215_25">Value</A> : <b>in</b> Boolean := True)
158    <b>is</b>
159       <b>function</b> <FONT COLOR=red><A NAME="155_16">Set_Item_Val</A></FONT> (<FONT COLOR=red><A NAME="155_30">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
160                              <FONT COLOR=red><A NAME="156_30">Val</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
161       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#155_16">Set_Item_Val</A>, "set_item_value");
162
163       <FONT COLOR=red><A NAME="159_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#155_16">Set_Item_Val</A> (<A HREF="terminal_interface-curses-menus__ads.htm#214_25">Itm</A>, Boolean'Pos (<A HREF="terminal_interface-curses-menus__ads.htm#215_25">Value</A>));
164    <b>begin</b>
165       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#159_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
166          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#159_7">Res</A>);
167       <b>end</b> <b>if</b>;
168    <b>end</b> Set_Value;
169
170    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#220_13">Value</A><FONT COLOR=red><A NAME="166_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#220_20">Itm</A> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> Boolean
171    <b>is</b>
172       <b>function</b> <FONT COLOR=red><A NAME="168_16">Item_Val</A></FONT> (<FONT COLOR=red><A NAME="168_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
173       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#168_16">Item_Val</A>, "item_value");
174    <b>begin</b>
175       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#168_16">Item_Val</A> (<A HREF="terminal_interface-curses-menus__ads.htm#220_20">Itm</A>) = <A HREF="terminal_interface-curses-aux__ads.htm#76_4">Curses_False</A> <b>then</b>
176          <b>return</b> False;
177       <b>else</b>
178          <b>return</b> True;
179       <b>end</b> <b>if</b>;
180    <b>end</b> Value;
181
182 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
183    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#229_13">Visible</A><FONT COLOR=red><A NAME="179_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#229_22">Itm</A> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> Boolean
184    <b>is</b>
185       <b>function</b> <FONT COLOR=red><A NAME="181_16">Item_Vis</A></FONT> (<FONT COLOR=red><A NAME="181_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
186       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#181_16">Item_Vis</A>, "item_visible");
187    <b>begin</b>
188       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#181_16">Item_Vis</A> (<A HREF="terminal_interface-curses-menus__ads.htm#229_22">Itm</A>) = <A HREF="terminal_interface-curses-aux__ads.htm#76_4">Curses_False</A> <b>then</b>
189          <b>return</b> False;
190       <b>else</b>
191          <b>return</b> True;
192       <b>end</b> <b>if</b>;
193    <b>end</b> Visible;
194 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
195    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#238_14">Set_Options</A><FONT COLOR=red><A NAME="191_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#238_27">Itm</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
196                           <A HREF="terminal_interface-curses-menus__ads.htm#239_27">Options</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>)
197    <b>is</b>
198       <b>function</b> <FONT COLOR=red><A NAME="194_16">Set_Item_Opts</A></FONT> (<FONT COLOR=red><A NAME="194_31">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
199                               <FONT COLOR=red><A NAME="195_31">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
200       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#194_16">Set_Item_Opts</A>, "set_item_opts");
201
202       <FONT COLOR=red><A NAME="198_7">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#68_13">IOS_2_CInt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#239_27">Options</A>);
203       <FONT COLOR=red><A NAME="199_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
204    <b>begin</b>
205       <A HREF="terminal_interface-curses-menus__adb.htm#199_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#194_16">Set_Item_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#238_27">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#198_7">Opt</A>);
206       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#199_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
207          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#199_7">Res</A>);
208       <b>end</b> <b>if</b>;
209    <b>end</b> Set_Options;
210
211    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#244_14">Switch_Options</A><FONT COLOR=red><A NAME="207_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#244_30">Itm</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
212                              <A HREF="terminal_interface-curses-menus__ads.htm#245_30">Options</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>;
213                              <A HREF="terminal_interface-curses-menus__ads.htm#246_30">On</A>      : Boolean := True)
214    <b>is</b>
215       <b>function</b> <FONT COLOR=red><A NAME="211_16">Item_Opts_On</A></FONT> (<FONT COLOR=red><A NAME="211_30">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
216                              <FONT COLOR=red><A NAME="212_30">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
217       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#211_16">Item_Opts_On</A>, "item_opts_on");
218       <b>function</b> <FONT COLOR=red><A NAME="214_16">Item_Opts_Off</A></FONT> (<FONT COLOR=red><A NAME="214_31">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
219                               <FONT COLOR=red><A NAME="215_31">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
220       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#214_16">Item_Opts_Off</A>, "item_opts_off");
221
222       <FONT COLOR=red><A NAME="218_7">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#68_13">IOS_2_CInt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#245_30">Options</A>);
223       <FONT COLOR=red><A NAME="219_7">Err</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
224    <b>begin</b>
225       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#246_30">On</A> <b>then</b>
226          <A HREF="terminal_interface-curses-menus__adb.htm#219_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#211_16">Item_Opts_On</A> (<A HREF="terminal_interface-curses-menus__ads.htm#244_30">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#218_7">Opt</A>);
227       <b>else</b>
228          <A HREF="terminal_interface-curses-menus__adb.htm#219_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#214_16">Item_Opts_Off</A> (<A HREF="terminal_interface-curses-menus__ads.htm#244_30">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#218_7">Opt</A>);
229       <b>end</b> <b>if</b>;
230       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#219_7">Err</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
231          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#219_7">Err</A>);
232       <b>end</b> <b>if</b>;
233    <b>end</b> Switch_Options;
234
235    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#253_14">Get_Options</A><FONT COLOR=red><A NAME="231_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#253_27">Itm</A>     : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
236                           <A HREF="terminal_interface-curses-menus__ads.htm#254_27">Options</A> : <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>)
237    <b>is</b>
238       <b>function</b> <FONT COLOR=red><A NAME="234_16">Item_Opts</A></FONT> (<FONT COLOR=red><A NAME="234_27">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
239       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#234_16">Item_Opts</A>, "item_opts");
240
241       <FONT COLOR=red><A NAME="237_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#234_16">Item_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#253_27">Itm</A>);
242    <b>begin</b>
243       <A HREF="terminal_interface-curses-menus__ads.htm#254_27">Options</A> := <A HREF="terminal_interface-curses-menus__adb.htm#72_13">CInt_2_IOS</A> (<A HREF="terminal_interface-curses-menus__adb.htm#237_7">Res</A>);
244    <b>end</b> Get_Options;
245
246    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#258_13">Get_Options</A><FONT COLOR=red><A NAME="242_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#258_26">Itm</A> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A> := <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>
247    <b>is</b>
248       <FONT COLOR=red><A NAME="244_7">Ios</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>;
249    <b>begin</b>
250       <A HREF="terminal_interface-curses-menus__ads.htm#253_14">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#258_26">Itm</A>, <A HREF="terminal_interface-curses-menus__adb.htm#244_7">Ios</A>);
251       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#244_7">Ios</A>;
252    <b>end</b> Get_Options;
253 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
254    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#267_14">Name</A><FONT COLOR=red><A NAME="250_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#267_20">Itm</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
255                    <A HREF="terminal_interface-curses-menus__ads.htm#268_20">Name</A> : <b>out</b> String)
256    <b>is</b>
257       <b>function</b> <FONT COLOR=red><A NAME="253_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="253_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
258       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#253_16">Itemname</A>, "item_name");
259    <b>begin</b>
260       <A HREF="terminal_interface-curses-aux__ads.htm#117_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#253_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#267_20">Itm</A>), <A HREF="terminal_interface-curses-menus__ads.htm#268_20">Name</A>);
261    <b>end</b> Name;
262
263    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#270_14">Name</A><FONT COLOR=red><A NAME="259_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#270_20">Itm</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> String
264    <b>is</b>
265       <b>function</b> <FONT COLOR=red><A NAME="261_16">Itemname</A></FONT> (<FONT COLOR=red><A NAME="261_26">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
266       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#261_16">Itemname</A>, "item_name");
267    <b>begin</b>
268       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#122_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#261_16">Itemname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#270_20">Itm</A>));
269    <b>end</b> Name;
270
271    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#276_14">Description</A><FONT COLOR=red><A NAME="267_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#276_27">Itm</A>         : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
272                           <A HREF="terminal_interface-curses-menus__ads.htm#277_27">Description</A> : <b>out</b> String)
273    <b>is</b>
274       <b>function</b> <FONT COLOR=red><A NAME="270_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="270_26">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
275       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#270_16">Descname</A>, "item_description");
276    <b>begin</b>
277       <A HREF="terminal_interface-curses-aux__ads.htm#117_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#270_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#276_27">Itm</A>), <A HREF="terminal_interface-curses-menus__ads.htm#277_27">Description</A>);
278    <b>end</b> Description;
279
280    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#280_14">Description</A><FONT COLOR=red><A NAME="276_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#280_27">Itm</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> String
281    <b>is</b>
282       <b>function</b> <FONT COLOR=red><A NAME="278_16">Descname</A></FONT> (<FONT COLOR=red><A NAME="278_26">Itm</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
283       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#278_16">Descname</A>, "item_description");
284    <b>begin</b>
285       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#122_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#278_16">Descname</A> (<A HREF="terminal_interface-curses-menus__ads.htm#280_27">Itm</A>));
286    <b>end</b> Description;
287 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
288    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#290_14">Set_Current</A><FONT COLOR=red><A NAME="284_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#290_27">Men</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
289                           <A HREF="terminal_interface-curses-menus__ads.htm#291_27">Itm</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>)
290    <b>is</b>
291       <b>function</b> <FONT COLOR=red><A NAME="287_16">Set_Curr_Item</A></FONT> (<FONT COLOR=red><A NAME="287_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
292                               <FONT COLOR=red><A NAME="288_31">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
293       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#287_16">Set_Curr_Item</A>, "set_current_item");
294
295       <FONT COLOR=red><A NAME="291_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#287_16">Set_Curr_Item</A> (<A HREF="terminal_interface-curses-menus__ads.htm#290_27">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#291_27">Itm</A>);
296    <b>begin</b>
297       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#291_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
298          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#291_7">Res</A>);
299       <b>end</b> <b>if</b>;
300    <b>end</b> Set_Current;
301
302    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#296_13">Current</A><FONT COLOR=red><A NAME="298_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#296_22">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>
303    <b>is</b>
304       <b>function</b> <FONT COLOR=red><A NAME="300_16">Curr_Item</A></FONT> (<FONT COLOR=red><A NAME="300_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>;
305       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#300_16">Curr_Item</A>, "current_item");
306
307       <FONT COLOR=red><A NAME="303_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A> := <A HREF="terminal_interface-curses-menus__adb.htm#300_16">Curr_Item</A> (<A HREF="terminal_interface-curses-menus__ads.htm#296_22">Men</A>);
308    <b>begin</b>
309       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#303_7">Res</A> = <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A> <b>then</b>
310          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
311       <b>end</b> <b>if</b>;
312       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#303_7">Res</A>;
313    <b>end</b> Current;
314
315    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#301_14">Set_Top_Row</A><FONT COLOR=red><A NAME="311_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#301_27">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
316                           <A HREF="terminal_interface-curses-menus__ads.htm#302_27">Line</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A>)
317    <b>is</b>
318       <b>function</b> <FONT COLOR=red><A NAME="314_16">Set_Toprow</A></FONT> (<FONT COLOR=red><A NAME="314_28">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
319                            <FONT COLOR=red><A NAME="315_28">Line</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
320       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#314_16">Set_Toprow</A>, "set_top_row");
321
322       <FONT COLOR=red><A NAME="318_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#314_16">Set_Toprow</A> (<A HREF="terminal_interface-curses-menus__ads.htm#301_27">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#302_27">Line</A>));
323    <b>begin</b>
324       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#318_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
325          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#318_7">Res</A>);
326       <b>end</b> <b>if</b>;
327    <b>end</b> Set_Top_Row;
328
329    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#307_13">Top_Row</A><FONT COLOR=red><A NAME="325_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#307_22">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A>
330    <b>is</b>
331       <b>function</b> <FONT COLOR=red><A NAME="327_16">Toprow</A></FONT> (<FONT COLOR=red><A NAME="327_24">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
332       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#327_16">Toprow</A>, "top_row");
333
334       <FONT COLOR=red><A NAME="330_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#327_16">Toprow</A> (<A HREF="terminal_interface-curses-menus__ads.htm#307_22">Men</A>);
335    <b>begin</b>
336       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#330_7">Res</A> = <A HREF="terminal_interface-curses-aux__ads.htm#73_4">Curses_Err</A> <b>then</b>
337          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
338       <b>end</b> <b>if</b>;
339       <b>return</b> <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#330_7">Res</A>);
340    <b>end</b> Top_Row;
341
342    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#312_13">Get_Index</A><FONT COLOR=red><A NAME="338_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#312_24">Itm</A> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> Positive
343    <b>is</b>
344       <b>function</b> <FONT COLOR=red><A NAME="340_16">Get_Itemindex</A></FONT> (<FONT COLOR=red><A NAME="340_31">Itm</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
345       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#340_16">Get_Itemindex</A>, "item_index");
346
347       <FONT COLOR=red><A NAME="343_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#340_16">Get_Itemindex</A> (<A HREF="terminal_interface-curses-menus__ads.htm#312_24">Itm</A>);
348    <b>begin</b>
349       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#343_7">Res</A> = <A HREF="terminal_interface-curses-aux__ads.htm#73_4">Curses_Err</A> <b>then</b>
350          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
351       <b>end</b> <b>if</b>;
352       <b>return</b> Positive (Natural (<A HREF="terminal_interface-curses-menus__adb.htm#343_7">Res</A>) + Positive'First);
353    <b>end</b> Get_Index;
354 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
355    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#324_14">Post</A><FONT COLOR=red><A NAME="351_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#324_20">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
356                    <A HREF="terminal_interface-curses-menus__ads.htm#325_20">Post</A> : <b>in</b> Boolean := True)
357    <b>is</b>
358       <b>function</b> <FONT COLOR=red><A NAME="354_16">M_Post</A></FONT> (<FONT COLOR=red><A NAME="354_24">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
359       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#354_16">M_Post</A>, "post_menu");
360       <b>function</b> <FONT COLOR=red><A NAME="356_16">M_Unpost</A></FONT> (<FONT COLOR=red><A NAME="356_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
361       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#356_16">M_Unpost</A>, "unpost_menu");
362
363       <FONT COLOR=red><A NAME="359_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
364    <b>begin</b>
365       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#325_20">Post</A> <b>then</b>
366          <A HREF="terminal_interface-curses-menus__adb.htm#359_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#354_16">M_Post</A> (<A HREF="terminal_interface-curses-menus__ads.htm#324_20">Men</A>);
367       <b>else</b>
368          <A HREF="terminal_interface-curses-menus__adb.htm#359_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#356_16">M_Unpost</A> (<A HREF="terminal_interface-curses-menus__ads.htm#324_20">Men</A>);
369       <b>end</b> <b>if</b>;
370       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#359_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
371          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#359_7">Res</A>);
372       <b>end</b> <b>if</b>;
373    <b>end</b> Post;
374 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
375    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#335_14">Set_Options</A><FONT COLOR=red><A NAME="371_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#335_27">Men</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
376                           <A HREF="terminal_interface-curses-menus__ads.htm#336_27">Options</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>)
377    <b>is</b>
378       <b>function</b> <FONT COLOR=red><A NAME="374_16">Set_Menu_Opts</A></FONT> (<FONT COLOR=red><A NAME="374_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
379                               <FONT COLOR=red><A NAME="375_31">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
380       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#374_16">Set_Menu_Opts</A>, "set_menu_opts");
381
382       <FONT COLOR=red><A NAME="378_7">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#60_13">MOS_2_CInt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#336_27">Options</A>);
383       <FONT COLOR=red><A NAME="379_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
384    <b>begin</b>
385       <A HREF="terminal_interface-curses-menus__adb.htm#379_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#374_16">Set_Menu_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#335_27">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#378_7">Opt</A>);
386       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#379_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
387          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#379_7">Res</A>);
388       <b>end</b> <b>if</b>;
389    <b>end</b> Set_Options;
390
391    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#341_14">Switch_Options</A><FONT COLOR=red><A NAME="387_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#341_30">Men</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
392                              <A HREF="terminal_interface-curses-menus__ads.htm#342_30">Options</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>;
393                              <A HREF="terminal_interface-curses-menus__ads.htm#343_30">On</A>      : <b>in</b> Boolean := True)
394    <b>is</b>
395       <b>function</b> <FONT COLOR=red><A NAME="391_16">Menu_Opts_On</A></FONT> (<FONT COLOR=red><A NAME="391_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
396                              <FONT COLOR=red><A NAME="392_30">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
397       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#391_16">Menu_Opts_On</A>, "menu_opts_on");
398       <b>function</b> <FONT COLOR=red><A NAME="394_16">Menu_Opts_Off</A></FONT> (<FONT COLOR=red><A NAME="394_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
399                               <FONT COLOR=red><A NAME="395_31">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
400       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#394_16">Menu_Opts_Off</A>, "menu_opts_off");
401
402       <FONT COLOR=red><A NAME="398_7">Opt</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#60_13">MOS_2_CInt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#342_30">Options</A>);
403       <FONT COLOR=red><A NAME="399_7">Err</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
404    <b>begin</b>
405       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#343_30">On</A> <b>then</b>
406          <A HREF="terminal_interface-curses-menus__adb.htm#399_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#391_16">Menu_Opts_On</A>  (<A HREF="terminal_interface-curses-menus__ads.htm#341_30">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#398_7">Opt</A>);
407       <b>else</b>
408          <A HREF="terminal_interface-curses-menus__adb.htm#399_7">Err</A> := <A HREF="terminal_interface-curses-menus__adb.htm#394_16">Menu_Opts_Off</A> (<A HREF="terminal_interface-curses-menus__ads.htm#341_30">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#398_7">Opt</A>);
409       <b>end</b> <b>if</b>;
410       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#399_7">Err</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
411          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#399_7">Err</A>);
412       <b>end</b> <b>if</b>;
413    <b>end</b> Switch_Options;
414
415    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#349_14">Get_Options</A><FONT COLOR=red><A NAME="411_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#349_27">Men</A>     : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
416                                <A HREF="terminal_interface-curses-menus__ads.htm#350_27">Options</A> : <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>)
417    <b>is</b>
418       <b>function</b> <FONT COLOR=red><A NAME="414_16">Menu_Opts</A></FONT> (<FONT COLOR=red><A NAME="414_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
419       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#414_16">Menu_Opts</A>, "menu_opts");
420
421       <FONT COLOR=red><A NAME="417_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> := <A HREF="terminal_interface-curses-menus__adb.htm#414_16">Menu_Opts</A> (<A HREF="terminal_interface-curses-menus__ads.htm#349_27">Men</A>);
422    <b>begin</b>
423       <A HREF="terminal_interface-curses-menus__ads.htm#350_27">Options</A> := <A HREF="terminal_interface-curses-menus__adb.htm#64_13">CInt_2_MOS</A> (<A HREF="terminal_interface-curses-menus__adb.htm#417_7">Res</A>);
424    <b>end</b> Get_Options;
425
426    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#354_13">Get_Options</A><FONT COLOR=red><A NAME="422_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#354_26">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A> := <A HREF="terminal_interface-curses-menus__ads.htm#63_4">Null_Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>
427    <b>is</b>
428       <FONT COLOR=red><A NAME="424_7">Mos</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>;
429    <b>begin</b>
430       <A HREF="terminal_interface-curses-menus__ads.htm#349_14">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#354_26">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#424_7">Mos</A>);
431       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#424_7">Mos</A>;
432    <b>end</b> Get_Options;
433 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
434    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#363_14">Set_Window</A><FONT COLOR=red><A NAME="430_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#363_26">Men</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
435                          <A HREF="terminal_interface-curses-menus__ads.htm#364_26">Win</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>)
436    <b>is</b>
437       <b>function</b> <FONT COLOR=red><A NAME="433_16">Set_Menu_Win</A></FONT> (<FONT COLOR=red><A NAME="433_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
438                              <FONT COLOR=red><A NAME="434_30">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
439       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#433_16">Set_Menu_Win</A>, "set_menu_win");
440
441       <FONT COLOR=red><A NAME="437_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#433_16">Set_Menu_Win</A> (<A HREF="terminal_interface-curses-menus__ads.htm#363_26">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#364_26">Win</A>);
442    <b>begin</b>
443       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#437_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
444          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#437_7">Res</A>);
445       <b>end</b> <b>if</b>;
446    <b>end</b> Set_Window;
447
448    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#369_13">Get_Window</A><FONT COLOR=red><A NAME="444_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#369_25">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>
449    <b>is</b>
450       <b>function</b> <FONT COLOR=red><A NAME="446_16">Menu_Win</A></FONT> (<FONT COLOR=red><A NAME="446_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>;
451       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#446_16">Menu_Win</A>, "menu_win");
452
453       <FONT COLOR=red><A NAME="449_7">W</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A> := <A HREF="terminal_interface-curses-menus__adb.htm#446_16">Menu_Win</A> (<A HREF="terminal_interface-curses-menus__ads.htm#369_25">Men</A>);
454    <b>begin</b>
455       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#449_7">W</A>;
456    <b>end</b> Get_Window;
457
458    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#374_14">Set_Sub_Window</A><FONT COLOR=red><A NAME="454_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#374_30">Men</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
459                              <A HREF="terminal_interface-curses-menus__ads.htm#375_30">Win</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>)
460    <b>is</b>
461       <b>function</b> <FONT COLOR=red><A NAME="457_16">Set_Menu_Sub</A></FONT> (<FONT COLOR=red><A NAME="457_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
462                              <FONT COLOR=red><A NAME="458_30">Win</A></FONT> : <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
463       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#457_16">Set_Menu_Sub</A>, "set_menu_sub");
464
465       <FONT COLOR=red><A NAME="461_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#457_16">Set_Menu_Sub</A> (<A HREF="terminal_interface-curses-menus__ads.htm#374_30">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#375_30">Win</A>);
466    <b>begin</b>
467       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#461_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
468          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#461_7">Res</A>);
469       <b>end</b> <b>if</b>;
470    <b>end</b> Set_Sub_Window;
471
472    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#380_13">Get_Sub_Window</A><FONT COLOR=red><A NAME="468_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#380_29">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>
473    <b>is</b>
474       <b>function</b> <FONT COLOR=red><A NAME="470_16">Menu_Sub</A></FONT> (<FONT COLOR=red><A NAME="470_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A>;
475       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#470_16">Menu_Sub</A>, "menu_sub");
476
477       <FONT COLOR=red><A NAME="473_7">W</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#57_9">Window</A> := <A HREF="terminal_interface-curses-menus__adb.htm#470_16">Menu_Sub</A> (<A HREF="terminal_interface-curses-menus__ads.htm#380_29">Men</A>);
478    <b>begin</b>
479       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#473_7">W</A>;
480    <b>end</b> Get_Sub_Window;
481
482    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#385_14">Scale</A><FONT COLOR=red><A NAME="478_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#385_21">Men</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
483                     <A HREF="terminal_interface-curses-menus__ads.htm#386_21">Lines</A>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#63_12">Line_Count</A>;
484                     <A HREF="terminal_interface-curses-menus__ads.htm#387_21">Columns</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#65_12">Column_Count</A>)
485    <b>is</b>
486       <b>type</b> <FONT COLOR=red><A NAME="482_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
487       <b>function</b> <FONT COLOR=red><A NAME="483_16">M_Scale</A></FONT> (<FONT COLOR=red><A NAME="483_25">Men</A></FONT>    : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
488                         <FONT COLOR=red><A NAME="484_25">Yp</A></FONT>, <FONT COLOR=red><A NAME="484_29">Xp</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#482_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
489       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#483_16">M_Scale</A>, "scale_menu");
490
491       <FONT COLOR=red><A NAME="487_7">X</A></FONT>, <FONT COLOR=red><A NAME="487_10">Y</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
492       <FONT COLOR=red><A NAME="488_7">Res</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#483_16">M_Scale</A> (<A HREF="terminal_interface-curses-menus__ads.htm#385_21">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#487_10">Y</A>'<b>Access</b>, <A HREF="terminal_interface-curses-menus__adb.htm#487_7">X</A>'<b>Access</b>);
493    <b>begin</b>
494       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#488_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
495          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#488_7">Res</A>);
496       <b>end</b> <b>if</b>;
497       <A HREF="terminal_interface-curses-menus__ads.htm#386_21">Lines</A> := <A HREF="terminal_interface-curses__ads.htm#63_12">Line_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#487_10">Y</A>);
498       <A HREF="terminal_interface-curses-menus__ads.htm#387_21">Columns</A> := <A HREF="terminal_interface-curses__ads.htm#65_12">Column_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#487_7">X</A>);
499    <b>end</b> Scale;
500 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
501    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#396_14">Position_Cursor</A><FONT COLOR=red><A NAME="497_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#396_31">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>)
502    <b>is</b>
503       <b>function</b> <FONT COLOR=red><A NAME="499_16">Pos_Menu_Cursor</A></FONT> (<FONT COLOR=red><A NAME="499_33">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
504       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#499_16">Pos_Menu_Cursor</A>, "pos_menu_cursor");
505
506       <FONT COLOR=red><A NAME="502_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#499_16">Pos_Menu_Cursor</A> (<A HREF="terminal_interface-curses-menus__ads.htm#396_31">Men</A>);
507    <b>begin</b>
508       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#502_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
509          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#502_7">Res</A>);
510       <b>end</b> <b>if</b>;
511    <b>end</b> Position_Cursor;
512
513 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
514    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#405_14">Set_Mark</A><FONT COLOR=red><A NAME="510_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#405_24">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
515                        <A HREF="terminal_interface-curses-menus__ads.htm#406_24">Mark</A> : <b>in</b> String)
516    <b>is</b>
517       <b>type</b> <FONT COLOR=red><A NAME="513_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.char;
518       <b>function</b> <FONT COLOR=red><A NAME="514_16">Set_Mark</A></FONT> (<FONT COLOR=red><A NAME="514_26">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
519                          <FONT COLOR=red><A NAME="515_26">Mark</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#513_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
520       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#514_16">Set_Mark</A>, "set_menu_mark");
521
522       <FONT COLOR=red><A NAME="518_7">Txt</A></FONT> : char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#406_24">Mark</A>'Length);
523       <FONT COLOR=red><A NAME="519_7">Len</A></FONT> : size_t;
524       <FONT COLOR=red><A NAME="520_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
525    <b>begin</b>
526       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#406_24">Mark</A>, <A HREF="terminal_interface-curses-menus__adb.htm#518_7">Txt</A>, <A HREF="terminal_interface-curses-menus__adb.htm#519_7">Len</A>);
527       <A HREF="terminal_interface-curses-menus__adb.htm#520_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#514_16">Set_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#405_24">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#518_7">Txt</A> (<A HREF="terminal_interface-curses-menus__adb.htm#518_7">Txt</A>'First)'<b>Access</b>);
528       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#520_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
529          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#520_7">Res</A>);
530       <b>end</b> <b>if</b>;
531    <b>end</b> Set_Mark;
532
533    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#411_14">Mark</A><FONT COLOR=red><A NAME="529_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#411_20">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
534                    <A HREF="terminal_interface-curses-menus__ads.htm#412_20">Mark</A> : <b>out</b> String)
535    <b>is</b>
536       <b>function</b> <FONT COLOR=red><A NAME="532_16">Get_Menu_Mark</A></FONT> (<FONT COLOR=red><A NAME="532_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
537       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#532_16">Get_Menu_Mark</A>, "menu_mark");
538    <b>begin</b>
539       <A HREF="terminal_interface-curses-aux__ads.htm#117_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#532_16">Get_Menu_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#411_20">Men</A>), <A HREF="terminal_interface-curses-menus__ads.htm#412_20">Mark</A>);
540    <b>end</b> Mark;
541
542    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#415_14">Mark</A><FONT COLOR=red><A NAME="538_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#415_20">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> String
543    <b>is</b>
544       <b>function</b> <FONT COLOR=red><A NAME="540_16">Get_Menu_Mark</A></FONT> (<FONT COLOR=red><A NAME="540_31">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
545       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#540_16">Get_Menu_Mark</A>, "menu_mark");
546    <b>begin</b>
547       <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#122_13">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#540_16">Get_Menu_Mark</A> (<A HREF="terminal_interface-curses-menus__ads.htm#415_20">Men</A>));
548    <b>end</b> Mark;
549
550 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
551    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#425_14">Set_Foreground</A><FONT COLOR=red><A NAME="547_14"></A></FONT>
552      (<A HREF="terminal_interface-curses-menus__ads.htm#426_7">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
553       <A HREF="terminal_interface-curses-menus__ads.htm#427_7">Fore</A>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#350_4">Normal_Video</A>;
554       <A HREF="terminal_interface-curses-menus__ads.htm#428_7">Color</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>'First)
555    <b>is</b>
556       <b>function</b> <FONT COLOR=red><A NAME="552_16">Set_Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="552_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
557                               <FONT COLOR=red><A NAME="553_31">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
558       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#552_16">Set_Menu_Fore</A>, "set_menu_fore");
559
560       <FONT COLOR=red><A NAME="556_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#352_9">Attributed_Character</A> := (Ch    =&gt; Character'First,
561                                              Color =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#428_7">Color</A>,
562                                              Attr  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#427_7">Fore</A>);
563       <FONT COLOR=red><A NAME="559_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#552_16">Set_Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#426_7">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#105_13">AttrChar_To_Chtype</A> (<A HREF="terminal_interface-curses-menus__adb.htm#556_7">Ch</A>));
564    <b>begin</b>
565       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#559_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
566          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#559_7">Res</A>);
567       <b>end</b> <b>if</b>;
568    <b>end</b> Set_Foreground;
569
570    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#433_14">Foreground</A><FONT COLOR=red><A NAME="566_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#433_26">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
571                          <A HREF="terminal_interface-curses-menus__ads.htm#434_26">Fore</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>)
572    <b>is</b>
573       <b>function</b> <FONT COLOR=red><A NAME="569_16">Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="569_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
574       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#569_16">Menu_Fore</A>, "menu_fore");
575    <b>begin</b>
576       <A HREF="terminal_interface-curses-menus__ads.htm#434_26">Fore</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#569_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#433_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
577    <b>end</b> Foreground;
578
579    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#438_14">Foreground</A><FONT COLOR=red><A NAME="575_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#438_26">Men</A>   : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
580                          <A HREF="terminal_interface-curses-menus__ads.htm#439_26">Fore</A>  : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>;
581                          <A HREF="terminal_interface-curses-menus__ads.htm#440_26">Color</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>)
582    <b>is</b>
583       <b>function</b> <FONT COLOR=red><A NAME="579_16">Menu_Fore</A></FONT> (<FONT COLOR=red><A NAME="579_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
584       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#579_16">Menu_Fore</A>, "menu_fore");
585    <b>begin</b>
586       <A HREF="terminal_interface-curses-menus__ads.htm#439_26">Fore</A>  := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#579_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#438_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
587       <A HREF="terminal_interface-curses-menus__ads.htm#440_26">Color</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#579_16">Menu_Fore</A> (<A HREF="terminal_interface-curses-menus__ads.htm#438_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#355_10">Color</A>;
588    <b>end</b> Foreground;
589
590    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#445_14">Set_Background</A><FONT COLOR=red><A NAME="586_14"></A></FONT>
591      (<A HREF="terminal_interface-curses-menus__ads.htm#446_7">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
592       <A HREF="terminal_interface-curses-menus__ads.htm#447_7">Back</A>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#350_4">Normal_Video</A>;
593       <A HREF="terminal_interface-curses-menus__ads.htm#448_7">Color</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>'First)
594    <b>is</b>
595       <b>function</b> <FONT COLOR=red><A NAME="591_16">Set_Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="591_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
596                               <FONT COLOR=red><A NAME="592_31">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
597       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#591_16">Set_Menu_Back</A>, "set_menu_back");
598
599       <FONT COLOR=red><A NAME="595_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#352_9">Attributed_Character</A> := (Ch    =&gt; Character'First,
600                                              Color =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#448_7">Color</A>,
601                                              Attr  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#447_7">Back</A>);
602       <FONT COLOR=red><A NAME="598_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#591_16">Set_Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#446_7">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#105_13">AttrChar_To_Chtype</A> (<A HREF="terminal_interface-curses-menus__adb.htm#595_7">Ch</A>));
603    <b>begin</b>
604       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#598_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
605          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#598_7">Res</A>);
606       <b>end</b> <b>if</b>;
607    <b>end</b> Set_Background;
608
609    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#453_14">Background</A><FONT COLOR=red><A NAME="605_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#453_26">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
610                          <A HREF="terminal_interface-curses-menus__ads.htm#454_26">Back</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>)
611    <b>is</b>
612       <b>function</b> <FONT COLOR=red><A NAME="608_16">Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="608_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
613       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#608_16">Menu_Back</A>, "menu_back");
614    <b>begin</b>
615       <A HREF="terminal_interface-curses-menus__ads.htm#454_26">Back</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#608_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#453_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
616    <b>end</b> Background;
617
618    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#458_14">Background</A><FONT COLOR=red><A NAME="614_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#458_26">Men</A>   : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
619                          <A HREF="terminal_interface-curses-menus__ads.htm#459_26">Back</A>  : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>;
620                          <A HREF="terminal_interface-curses-menus__ads.htm#460_26">Color</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>)
621    <b>is</b>
622       <b>function</b> <FONT COLOR=red><A NAME="618_16">Menu_Back</A></FONT> (<FONT COLOR=red><A NAME="618_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
623       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#618_16">Menu_Back</A>, "menu_back");
624    <b>begin</b>
625       <A HREF="terminal_interface-curses-menus__ads.htm#459_26">Back</A>  := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#618_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#458_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
626       <A HREF="terminal_interface-curses-menus__ads.htm#460_26">Color</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#618_16">Menu_Back</A> (<A HREF="terminal_interface-curses-menus__ads.htm#458_26">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#355_10">Color</A>;
627    <b>end</b> Background;
628
629    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#465_14">Set_Grey</A><FONT COLOR=red><A NAME="625_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#466_7">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
630                        <A HREF="terminal_interface-curses-menus__ads.htm#467_7">Grey</A>  : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A> := <A HREF="terminal_interface-curses__ads.htm#350_4">Normal_Video</A>;
631                        <A HREF="terminal_interface-curses-menus__ads.htm#468_7">Color</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A> := <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>'First)
632    <b>is</b>
633       <b>function</b> <FONT COLOR=red><A NAME="629_16">Set_Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="629_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
634                               <FONT COLOR=red><A NAME="630_31">Attr</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
635       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#629_16">Set_Menu_Grey</A>, "set_menu_grey");
636
637       <FONT COLOR=red><A NAME="633_7">Ch</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses__ads.htm#352_9">Attributed_Character</A> := (Ch    =&gt; Character'First,
638                                              Color =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#468_7">Color</A>,
639                                              Attr  =&gt; <A HREF="terminal_interface-curses-menus__ads.htm#467_7">Grey</A>);
640
641       <FONT COLOR=red><A NAME="637_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#629_16">Set_Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#466_7">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#105_13">AttrChar_To_Chtype</A> (<A HREF="terminal_interface-curses-menus__adb.htm#633_7">Ch</A>));
642    <b>begin</b>
643       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#637_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
644          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#637_7">Res</A>);
645       <b>end</b> <b>if</b>;
646    <b>end</b> Set_Grey;
647
648    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#473_14">Grey</A><FONT COLOR=red><A NAME="644_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#473_20">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
649                    <A HREF="terminal_interface-curses-menus__ads.htm#474_20">Grey</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>)
650    <b>is</b>
651       <b>function</b> <FONT COLOR=red><A NAME="647_16">Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="647_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
652       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#647_16">Menu_Grey</A>, "menu_grey");
653    <b>begin</b>
654       <A HREF="terminal_interface-curses-menus__ads.htm#474_20">Grey</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#647_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#473_20">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
655    <b>end</b> Grey;
656
657    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#478_14">Grey</A><FONT COLOR=red><A NAME="653_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#479_7">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
658                    <A HREF="terminal_interface-curses-menus__ads.htm#480_7">Grey</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#306_9">Character_Attribute_Set</A>;
659                    <A HREF="terminal_interface-curses-menus__ads.htm#481_7">Color</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#298_9">Color_Pair</A>)
660    <b>is</b>
661       <b>function</b> <FONT COLOR=red><A NAME="657_16">Menu_Grey</A></FONT> (<FONT COLOR=red><A NAME="657_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#64_12">C_Chtype</A>;
662       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#657_16">Menu_Grey</A>, "menu_grey");
663    <b>begin</b>
664       <A HREF="terminal_interface-curses-menus__ads.htm#480_7">Grey</A>  := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#657_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#479_7">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#354_10">Attr</A>;
665       <A HREF="terminal_interface-curses-menus__ads.htm#481_7">Color</A> := <A HREF="terminal_interface-curses-aux__ads.htm#102_13">Chtype_To_AttrChar</A> (<A HREF="terminal_interface-curses-menus__adb.htm#657_16">Menu_Grey</A> (<A HREF="terminal_interface-curses-menus__ads.htm#479_7">Men</A>)).<A HREF="terminal_interface-curses__ads.htm#355_10">Color</A>;
666    <b>end</b> Grey;
667
668    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#486_14">Set_Pad_Character</A><FONT COLOR=red><A NAME="664_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#486_33">Men</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
669                                 <A HREF="terminal_interface-curses-menus__ads.htm#487_33">Pad</A> : <b>in</b> Character := <A HREF="terminal_interface-curses-menus__ads.htm#54_4">Space</A>)
670    <b>is</b>
671       <b>function</b> <FONT COLOR=red><A NAME="667_16">Set_Menu_Pad</A></FONT> (<FONT COLOR=red><A NAME="667_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
672                              <FONT COLOR=red><A NAME="668_30">Ch</A></FONT>  : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
673       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#667_16">Set_Menu_Pad</A>, "set_menu_pad");
674
675       <FONT COLOR=red><A NAME="671_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#667_16">Set_Menu_Pad</A> (<A HREF="terminal_interface-curses-menus__ads.htm#486_33">Men</A>,
676                                                 <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (Character'Pos (<A HREF="terminal_interface-curses-menus__ads.htm#487_33">Pad</A>)));
677    <b>begin</b>
678       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#671_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
679          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#671_7">Res</A>);
680       <b>end</b> <b>if</b>;
681    <b>end</b> Set_Pad_Character;
682
683    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#492_14">Pad_Character</A><FONT COLOR=red><A NAME="679_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#492_29">Men</A> : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
684                             <A HREF="terminal_interface-curses-menus__ads.htm#493_29">Pad</A> : <b>out</b> Character)
685    <b>is</b>
686       <b>function</b> <FONT COLOR=red><A NAME="682_16">Menu_Pad</A></FONT> (<FONT COLOR=red><A NAME="682_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
687       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#682_16">Menu_Pad</A>, "menu_pad");
688    <b>begin</b>
689       <A HREF="terminal_interface-curses-menus__ads.htm#493_29">Pad</A> := Character'Val (<A HREF="terminal_interface-curses-menus__adb.htm#682_16">Menu_Pad</A> (<A HREF="terminal_interface-curses-menus__ads.htm#492_29">Men</A>));
690    <b>end</b> Pad_Character;
691 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
692    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#502_14">Set_Spacing</A><FONT COLOR=red><A NAME="688_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#502_27">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
693                           <A HREF="terminal_interface-curses-menus__ads.htm#503_27">Descr</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A> := 0;
694                           <A HREF="terminal_interface-curses-menus__ads.htm#504_27">Row</A>   : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A>   := 0;
695                           <A HREF="terminal_interface-curses-menus__ads.htm#505_27">Col</A>   : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A> := 0)
696    <b>is</b>
697       <b>function</b> <FONT COLOR=red><A NAME="693_16">Set_Spacing</A></FONT> (<FONT COLOR=red><A NAME="693_29">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
698                             <FONT COLOR=red><A NAME="694_29">D</A></FONT>, <FONT COLOR=red><A NAME="694_32">R</A></FONT>, <FONT COLOR=red><A NAME="694_35">C</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
699       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#693_16">Set_Spacing</A>, "set_menu_spacing");
700
701       <FONT COLOR=red><A NAME="697_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#693_16">Set_Spacing</A> (<A HREF="terminal_interface-curses-menus__ads.htm#502_27">Men</A>,
702                                                <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#503_27">Descr</A>),
703                                                <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#504_27">Row</A>),
704                                                <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#505_27">Col</A>));
705    <b>begin</b>
706       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#697_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
707          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#697_7">Res</A>);
708       <b>end</b> <b>if</b>;
709    <b>end</b> Set_Spacing;
710
711    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#510_14">Spacing</A><FONT COLOR=red><A NAME="707_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#510_23">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
712                       <A HREF="terminal_interface-curses-menus__ads.htm#511_23">Descr</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A>;
713                       <A HREF="terminal_interface-curses-menus__ads.htm#512_23">Row</A>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A>;
714                       <A HREF="terminal_interface-curses-menus__ads.htm#513_23">Col</A>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A>)
715    <b>is</b>
716       <b>type</b> <FONT COLOR=red><A NAME="712_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
717       <b>function</b> <FONT COLOR=red><A NAME="713_16">Get_Spacing</A></FONT> (<FONT COLOR=red><A NAME="713_29">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
718                             <FONT COLOR=red><A NAME="714_29">D</A></FONT>, <FONT COLOR=red><A NAME="714_32">R</A></FONT>, <FONT COLOR=red><A NAME="714_35">C</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#712_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
719       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#713_16">Get_Spacing</A>, "menu_spacing");
720
721       <FONT COLOR=red><A NAME="717_7">D</A></FONT>, <FONT COLOR=red><A NAME="717_10">R</A></FONT>, <FONT COLOR=red><A NAME="717_13">C</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
722       <FONT COLOR=red><A NAME="718_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#713_16">Get_Spacing</A> (<A HREF="terminal_interface-curses-menus__ads.htm#510_23">Men</A>,
723                                                <A HREF="terminal_interface-curses-menus__adb.htm#717_7">D</A>'<b>Access</b>,
724                                                <A HREF="terminal_interface-curses-menus__adb.htm#717_10">R</A>'<b>Access</b>,
725                                                <A HREF="terminal_interface-curses-menus__adb.htm#717_13">C</A>'<b>Access</b>);
726    <b>begin</b>
727       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#718_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
728          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#718_7">Res</A>);
729       <b>else</b>
730          <A HREF="terminal_interface-curses-menus__ads.htm#511_23">Descr</A> := <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#717_7">D</A>);
731          <A HREF="terminal_interface-curses-menus__ads.htm#512_23">Row</A>   := <A HREF="terminal_interface-curses__ads.htm#60_9">Line_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#717_10">R</A>);
732          <A HREF="terminal_interface-curses-menus__ads.htm#513_23">Col</A>   := <A HREF="terminal_interface-curses__ads.htm#61_9">Column_Position</A> (<A HREF="terminal_interface-curses-menus__adb.htm#717_13">C</A>);
733       <b>end</b> <b>if</b>;
734    <b>end</b> Spacing;
735 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
736    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#522_13">Set_Pattern</A><FONT COLOR=red><A NAME="732_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#522_26">Men</A>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
737                          <A HREF="terminal_interface-curses-menus__ads.htm#523_26">Text</A> : String) <b>return</b> Boolean
738    <b>is</b>
739       <b>type</b> <FONT COLOR=red><A NAME="735_12">Char_Ptr</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="interfac__ads.htm#23_9">Interfaces</A>.C.char;
740       <b>function</b> <FONT COLOR=red><A NAME="736_16">Set_Pattern</A></FONT> (<FONT COLOR=red><A NAME="736_29">Men</A></FONT>     : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
741                             <FONT COLOR=red><A NAME="737_29">Pattern</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#735_12">Char_Ptr</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
742       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#736_16">Set_Pattern</A>, "set_menu_pattern");
743
744       <FONT COLOR=red><A NAME="740_7">S</A></FONT>   : char_array (0 .. <A HREF="terminal_interface-curses-menus__ads.htm#523_26">Text</A>'Length);
745       <FONT COLOR=red><A NAME="741_7">L</A></FONT>   : size_t;
746       <FONT COLOR=red><A NAME="742_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
747    <b>begin</b>
748       To_C (<A HREF="terminal_interface-curses-menus__ads.htm#523_26">Text</A>, <A HREF="terminal_interface-curses-menus__adb.htm#740_7">S</A>, <A HREF="terminal_interface-curses-menus__adb.htm#741_7">L</A>);
749       <A HREF="terminal_interface-curses-menus__adb.htm#742_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#736_16">Set_Pattern</A> (<A HREF="terminal_interface-curses-menus__ads.htm#522_26">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#740_7">S</A> (<A HREF="terminal_interface-curses-menus__adb.htm#740_7">S</A>'First)'<b>Access</b>);
750       <b>case</b> <A HREF="terminal_interface-curses-menus__adb.htm#742_7">Res</A> <b>is</b>
751          <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#90_4">E_No_Match</A> =&gt; <b>return</b> False;
752          <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A>       =&gt; <b>return</b> True;
753          <b>when</b> <b>others</b> =&gt;
754             <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#742_7">Res</A>);
755             <b>return</b> False;
756       <b>end</b> <b>case</b>;
757    <b>end</b> Set_Pattern;
758
759    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#529_14">Pattern</A><FONT COLOR=red><A NAME="755_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#529_23">Men</A>  : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
760                       <A HREF="terminal_interface-curses-menus__ads.htm#530_23">Text</A> : <b>out</b> String)
761    <b>is</b>
762       <b>function</b> <FONT COLOR=red><A NAME="758_16">Get_Pattern</A></FONT> (<FONT COLOR=red><A NAME="758_29">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#58_12">chars_ptr</A>;
763       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#758_16">Get_Pattern</A>, "menu_pattern");
764    <b>begin</b>
765       <A HREF="terminal_interface-curses-aux__ads.htm#117_14">Fill_String</A> (<A HREF="terminal_interface-curses-menus__adb.htm#758_16">Get_Pattern</A> (<A HREF="terminal_interface-curses-menus__ads.htm#529_23">Men</A>), <A HREF="terminal_interface-curses-menus__ads.htm#530_23">Text</A>);
766    <b>end</b> Pattern;
767 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
768    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#539_14">Set_Format</A><FONT COLOR=red><A NAME="764_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#539_26">Men</A>     : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
769                          <A HREF="terminal_interface-curses-menus__ads.htm#540_26">Lines</A>   : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#63_12">Line_Count</A>;
770                          <A HREF="terminal_interface-curses-menus__ads.htm#541_26">Columns</A> : <b>in</b> <A HREF="terminal_interface-curses__ads.htm#65_12">Column_Count</A>)
771    <b>is</b>
772       <b>function</b> <FONT COLOR=red><A NAME="768_16">Set_Menu_Fmt</A></FONT> (<FONT COLOR=red><A NAME="768_30">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
773                              <FONT COLOR=red><A NAME="769_30">Lin</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
774                              <FONT COLOR=red><A NAME="770_30">Col</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
775       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#768_16">Set_Menu_Fmt</A>, "set_menu_format");
776
777       <FONT COLOR=red><A NAME="773_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#768_16">Set_Menu_Fmt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#539_26">Men</A>,
778                                                 <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#540_26">Lines</A>),
779                                                 <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#541_26">Columns</A>));
780    <b>begin</b>
781       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#773_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
782          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#773_7">Res</A>);
783       <b>end</b> <b>if</b>;
784    <b>end</b> Set_Format;
785
786    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#553_14">Format</A><FONT COLOR=red><A NAME="782_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#553_22">Men</A>     : <b>in</b>  <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
787                      <A HREF="terminal_interface-curses-menus__ads.htm#554_22">Lines</A>   : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#63_12">Line_Count</A>;
788                      <A HREF="terminal_interface-curses-menus__ads.htm#555_22">Columns</A> : <b>out</b> <A HREF="terminal_interface-curses__ads.htm#65_12">Column_Count</A>)
789    <b>is</b>
790       <b>type</b> <FONT COLOR=red><A NAME="786_12">C_Int_Access</A></FONT> <b>is</b> <b>access</b> <b>all</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
791       <b>function</b> <FONT COLOR=red><A NAME="787_16">Menu_Fmt</A></FONT> (<FONT COLOR=red><A NAME="787_26">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
792                          <FONT COLOR=red><A NAME="788_26">Y</A></FONT>, <FONT COLOR=red><A NAME="788_29">X</A></FONT> : <A HREF="terminal_interface-curses-menus__adb.htm#786_12">C_Int_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
793       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#787_16">Menu_Fmt</A>, "menu_format");
794
795       <FONT COLOR=red><A NAME="791_7">L</A></FONT>, <FONT COLOR=red><A NAME="791_10">C</A></FONT> : <b>aliased</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
796       <FONT COLOR=red><A NAME="792_7">Res</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#787_16">Menu_Fmt</A> (<A HREF="terminal_interface-curses-menus__ads.htm#553_22">Men</A>, <A HREF="terminal_interface-curses-menus__adb.htm#791_7">L</A>'<b>Access</b>, <A HREF="terminal_interface-curses-menus__adb.htm#791_10">C</A>'<b>Access</b>);
797    <b>begin</b>
798       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#792_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
799          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#792_7">Res</A>);
800       <b>else</b>
801          <A HREF="terminal_interface-curses-menus__ads.htm#554_22">Lines</A>   := <A HREF="terminal_interface-curses__ads.htm#63_12">Line_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#791_7">L</A>);
802          <A HREF="terminal_interface-curses-menus__ads.htm#555_22">Columns</A> := <A HREF="terminal_interface-curses__ads.htm#65_12">Column_Count</A> (<A HREF="terminal_interface-curses-menus__adb.htm#791_10">C</A>);
803       <b>end</b> <b>if</b>;
804    <b>end</b> Format;
805 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
806    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#567_14">Set_Item_Init_Hook</A><FONT COLOR=red><A NAME="802_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#567_34">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
807                                  <A HREF="terminal_interface-curses-menus__ads.htm#568_34">Proc</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>)
808    <b>is</b>
809       <b>function</b> <FONT COLOR=red><A NAME="805_16">Set_Item_Init</A></FONT> (<FONT COLOR=red><A NAME="805_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
810                               <FONT COLOR=red><A NAME="806_31">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
811       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#805_16">Set_Item_Init</A>, "set_item_init");
812
813       <FONT COLOR=red><A NAME="809_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#805_16">Set_Item_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#567_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#568_34">Proc</A>);
814    <b>begin</b>
815       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#809_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
816          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#809_7">Res</A>);
817       <b>end</b> <b>if</b>;
818    <b>end</b> Set_Item_Init_Hook;
819
820    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#573_14">Set_Item_Term_Hook</A><FONT COLOR=red><A NAME="816_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#573_34">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
821                                  <A HREF="terminal_interface-curses-menus__ads.htm#574_34">Proc</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>)
822    <b>is</b>
823       <b>function</b> <FONT COLOR=red><A NAME="819_16">Set_Item_Term</A></FONT> (<FONT COLOR=red><A NAME="819_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
824                               <FONT COLOR=red><A NAME="820_31">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
825       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#819_16">Set_Item_Term</A>, "set_item_term");
826
827       <FONT COLOR=red><A NAME="823_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#819_16">Set_Item_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#573_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#574_34">Proc</A>);
828    <b>begin</b>
829       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#823_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
830          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#823_7">Res</A>);
831       <b>end</b> <b>if</b>;
832    <b>end</b> Set_Item_Term_Hook;
833
834    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#579_14">Set_Menu_Init_Hook</A><FONT COLOR=red><A NAME="830_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#579_34">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
835                                  <A HREF="terminal_interface-curses-menus__ads.htm#580_34">Proc</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>)
836    <b>is</b>
837       <b>function</b> <FONT COLOR=red><A NAME="833_16">Set_Menu_Init</A></FONT> (<FONT COLOR=red><A NAME="833_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
838                               <FONT COLOR=red><A NAME="834_31">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
839       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#833_16">Set_Menu_Init</A>, "set_menu_init");
840
841       <FONT COLOR=red><A NAME="837_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#833_16">Set_Menu_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#579_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#580_34">Proc</A>);
842    <b>begin</b>
843       <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#837_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
844          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#837_7">Res</A>);
845       <b>end</b> <b>if</b>;
846    <b>end</b> Set_Menu_Init_Hook;
847
848    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#585_14">Set_Menu_Term_Hook</A><FONT COLOR=red><A NAME="844_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#585_34">Men</A>  : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
849                                  <A HREF="terminal_interface-curses-menus__ads.htm#586_34">Proc</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>)
850    <b>is</b>
851       <b>function</b> <FONT COLOR=red><A NAME="847_16">Set_Menu_Term</A></FONT> (<FONT COLOR=red><A NAME="847_31">Men</A></FONT>  : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
852                               <FONT COLOR=red><A NAME="848_31">Proc</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
853       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#847_16">Set_Menu_Term</A>, "set_menu_term");
854
855       <FONT COLOR=red><A NAME="851_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#847_16">Set_Menu_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#585_34">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#586_34">Proc</A>);
856    <b>begin</b>
857       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#851_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
858          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#851_7">Res</A>);
859       <b>end</b> <b>if</b>;
860    <b>end</b> Set_Menu_Term_Hook;
861
862    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#591_13">Get_Item_Init_Hook</A><FONT COLOR=red><A NAME="858_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#591_33">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>
863    <b>is</b>
864       <b>function</b> <FONT COLOR=red><A NAME="860_16">Item_Init</A></FONT> (<FONT COLOR=red><A NAME="860_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>;
865       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#860_16">Item_Init</A>, "item_init");
866    <b>begin</b>
867       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#860_16">Item_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#591_33">Men</A>);
868    <b>end</b> Get_Item_Init_Hook;
869
870    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#596_13">Get_Item_Term_Hook</A><FONT COLOR=red><A NAME="866_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#596_33">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>
871    <b>is</b>
872       <b>function</b> <FONT COLOR=red><A NAME="868_16">Item_Term</A></FONT> (<FONT COLOR=red><A NAME="868_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>;
873       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#868_16">Item_Term</A>, "item_term");
874    <b>begin</b>
875       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#868_16">Item_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#596_33">Men</A>);
876    <b>end</b> Get_Item_Term_Hook;
877
878    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#601_13">Get_Menu_Init_Hook</A><FONT COLOR=red><A NAME="874_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#601_33">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>
879    <b>is</b>
880       <b>function</b> <FONT COLOR=red><A NAME="876_16">Menu_Init</A></FONT> (<FONT COLOR=red><A NAME="876_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>;
881       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#876_16">Menu_Init</A>, "menu_init");
882    <b>begin</b>
883       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#876_16">Menu_Init</A> (<A HREF="terminal_interface-curses-menus__ads.htm#601_33">Men</A>);
884    <b>end</b> Get_Menu_Init_Hook;
885
886    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#606_13">Get_Menu_Term_Hook</A><FONT COLOR=red><A NAME="882_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#606_33">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>
887    <b>is</b>
888       <b>function</b> <FONT COLOR=red><A NAME="884_16">Menu_Term</A></FONT> (<FONT COLOR=red><A NAME="884_27">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#563_9">Menu_Hook_Function</A>;
889       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#884_16">Menu_Term</A>, "menu_term");
890    <b>begin</b>
891       <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#884_16">Menu_Term</A> (<A HREF="terminal_interface-curses-menus__ads.htm#606_33">Men</A>);
892    <b>end</b> Get_Menu_Term_Hook;
893 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
894    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#615_14">Redefine</A><FONT COLOR=red><A NAME="890_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#615_24">Men</A>   : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
895                        <A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A> : <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#180_9">Item_Array_Access</A>)
896    <b>is</b>
897       <b>function</b> <FONT COLOR=red><A NAME="893_16">Set_Items</A></FONT> (<FONT COLOR=red><A NAME="893_27">Men</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
898                           <FONT COLOR=red><A NAME="894_27">Items</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
899       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#893_16">Set_Items</A>, "set_menu_items");
900
901       <FONT COLOR=red><A NAME="897_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A>;
902    <b>begin</b>
903       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A>'Last) = <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>);
904       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A>'Last) /= <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A> <b>then</b>
905          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
906       <b>else</b>
907          <A HREF="terminal_interface-curses-menus__adb.htm#897_7">Res</A> := <A HREF="terminal_interface-curses-menus__adb.htm#893_16">Set_Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#615_24">Men</A>, <A HREF="terminal_interface-curses-menus__ads.htm#616_24">Items</A>.<b>all</b>'Address);
908          <b>if</b>  <A HREF="terminal_interface-curses-menus__adb.htm#897_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
909             <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#897_7">Res</A>);
910          <b>end</b> <b>if</b>;
911       <b>end</b> <b>if</b>;
912    <b>end</b> Redefine;
913
914    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#631_13">Item_Count</A><FONT COLOR=red><A NAME="910_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#631_25">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> Natural
915    <b>is</b>
916       <b>function</b> <FONT COLOR=red><A NAME="912_16">Count</A></FONT> (<FONT COLOR=red><A NAME="912_23">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
917       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#912_16">Count</A>, "item_count");
918    <b>begin</b>
919       <b>return</b> Natural (<A HREF="terminal_interface-curses-menus__adb.htm#912_16">Count</A> (<A HREF="terminal_interface-curses-menus__ads.htm#631_25">Men</A>));
920    <b>end</b> Item_Count;
921
922    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#625_13">Items</A><FONT COLOR=red><A NAME="918_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#625_20">Men</A>   : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
923                    <A HREF="terminal_interface-curses-menus__ads.htm#626_20">Index</A> : Positive) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#56_9">Item</A>
924    <b>is</b>
925       <b>use</b> <A HREF="terminal_interface-curses-menus__adb.htm#54_12">I_Array</A>;
926
927       <b>function</b> <FONT COLOR=red><A NAME="923_16">C_Mitems</A></FONT> (<FONT COLOR=red><A NAME="923_26">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> Pointer;
928       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#923_16">C_Mitems</A>, "menu_items");
929
930       <FONT COLOR=red><A NAME="926_7">P</A></FONT> : Pointer := <A HREF="terminal_interface-curses-menus__adb.htm#923_16">C_Mitems</A> (<A HREF="terminal_interface-curses-menus__ads.htm#625_20">Men</A>);
931    <b>begin</b>
932       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#926_7">P</A> = <b>null</b> <b>or</b> <b>else</b> <A HREF="terminal_interface-curses-menus__ads.htm#626_20">Index</A> <b>not</b> <b>in</b> 1 .. <A HREF="terminal_interface-curses-menus__ads.htm#631_13">Item_Count</A> (<A HREF="terminal_interface-curses-menus__ads.htm#625_20">Men</A>) <b>then</b>
933          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
934       <b>else</b>
935          <A HREF="terminal_interface-curses-menus__adb.htm#926_7">P</A> := <A HREF="terminal_interface-curses-menus__adb.htm#926_7">P</A> + ptrdiff_t (<A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#626_20">Index</A>) - 1);
936          <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#926_7">P</A>.<b>all</b>;
937       <b>end</b> <b>if</b>;
938    <b>end</b> Items;
939
940 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
941    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#640_13">Create</A><FONT COLOR=red><A NAME="937_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A> : <A HREF="terminal_interface-curses-menus__ads.htm#180_9">Item_Array_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>
942    <b>is</b>
943       <b>function</b> <FONT COLOR=red><A NAME="939_16">Newmenu</A></FONT> (<FONT COLOR=red><A NAME="939_25">Items</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
944       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#939_16">Newmenu</A>, "new_menu");
945
946       <FONT COLOR=red><A NAME="942_7">M</A></FONT>   : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
947    <b>begin</b>
948       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A>'Last) = <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>);
949       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A> (<A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A>'Last) /= <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A> <b>then</b>
950          <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
951       <b>else</b>
952          <A HREF="terminal_interface-curses-menus__adb.htm#942_7">M</A> := <A HREF="terminal_interface-curses-menus__adb.htm#939_16">Newmenu</A> (<A HREF="terminal_interface-curses-menus__ads.htm#640_21">Items</A>.<b>all</b>'Address);
953          <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#942_7">M</A> = <A HREF="terminal_interface-curses-menus__ads.htm#63_4">Null_Menu</A> <b>then</b>
954             <b>raise</b> <A HREF="terminal_interface-curses-menus__ads.htm#116_4">Menu_Exception</A>;
955          <b>end</b> <b>if</b>;
956          <b>return</b> <A HREF="terminal_interface-curses-menus__adb.htm#942_7">M</A>;
957       <b>end</b> <b>if</b>;
958    <b>end</b> Create;
959
960    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#647_14">Delete</A><FONT COLOR=red><A NAME="956_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#647_22">Men</A> : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>)
961    <b>is</b>
962       <b>function</b> <FONT COLOR=red><A NAME="958_16">Free</A></FONT> (<FONT COLOR=red><A NAME="958_22">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
963       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#958_16">Free</A>, "free_menu");
964
965       <FONT COLOR=red><A NAME="961_7">Res</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#958_16">Free</A> (<A HREF="terminal_interface-curses-menus__ads.htm#647_22">Men</A>);
966    <b>begin</b>
967       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#961_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
968          <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#961_7">Res</A>);
969       <b>end</b> <b>if</b>;
970       <A HREF="terminal_interface-curses-menus__ads.htm#647_22">Men</A> := <A HREF="terminal_interface-curses-menus__ads.htm#63_4">Null_Menu</A>;
971    <b>end</b> Delete;
972
973 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
974    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#662_13">Driver</A><FONT COLOR=red><A NAME="970_13"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#662_21">Men</A> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
975                     <A HREF="terminal_interface-curses-menus__ads.htm#663_21">Key</A> : <A HREF="terminal_interface-curses__ads.htm#68_9">Key_Code</A>) <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#656_9">Driver_Result</A>
976    <b>is</b>
977       <b>function</b> <FONT COLOR=red><A NAME="973_16">Driver</A></FONT> (<FONT COLOR=red><A NAME="973_24">Men</A></FONT> : <A HREF="terminal_interface-curses-menus__ads.htm#57_9">Menu</A>;
978                        <FONT COLOR=red><A NAME="974_24">Key</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>) <b>return</b> <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A>;
979       <b>pragma</b> Import (C, <A HREF="terminal_interface-curses-menus__adb.htm#973_16">Driver</A>, "menu_driver");
980
981       <FONT COLOR=red><A NAME="977_7">R</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#79_12">Eti_Error</A> := <A HREF="terminal_interface-curses-menus__adb.htm#973_16">Driver</A> (<A HREF="terminal_interface-curses-menus__ads.htm#662_21">Men</A>, <A HREF="terminal_interface-curses-aux__ads.htm#56_12">C_Int</A> (<A HREF="terminal_interface-curses-menus__ads.htm#663_21">Key</A>));
982    <b>begin</b>
983       <b>if</b> <A HREF="terminal_interface-curses-menus__adb.htm#977_7">R</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#81_4">E_Ok</A> <b>then</b>
984          <b>case</b> <A HREF="terminal_interface-curses-menus__adb.htm#977_7">R</A> <b>is</b>
985             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#89_4">E_Unknown_Command</A>  =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#658_27">Unknown_Request</A>;
986             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#90_4">E_No_Match</A>         =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#659_27">No_Match</A>;
987             <b>when</b> <A HREF="terminal_interface-curses-aux__ads.htm#93_4">E_Request_Denied</A> |
988                  <A HREF="terminal_interface-curses-aux__ads.htm#91_4">E_Not_Selectable</A>   =&gt; <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#657_27">Request_Denied</A>;
989             <b>when</b> <b>others</b> =&gt;
990                <A HREF="terminal_interface-curses-aux__ads.htm#97_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-menus__adb.htm#977_7">R</A>);
991          <b>end</b> <b>case</b>;
992       <b>end</b> <b>if</b>;
993       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#656_27">Menu_Ok</A>;
994    <b>end</b> Driver;
995
996    <b>procedure</b> <A HREF="terminal_interface-curses-menus__ads.htm#182_14">Free</A><FONT COLOR=red><A NAME="992_14"></A></FONT> (<A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A>         : <b>in</b> <b>out</b> <A HREF="terminal_interface-curses-menus__ads.htm#180_9">Item_Array_Access</A>;
997                    <A HREF="terminal_interface-curses-menus__ads.htm#183_20">Free_Items</A> : <b>in</b> Boolean := False)
998    <b>is</b>
999       <b>procedure</b> <FONT COLOR=red><A NAME="995_17">Release</A></FONT> <b>is</b> <b>new</b> Ada.Unchecked_Deallocation
1000         (<A HREF="terminal_interface-curses-menus__ads.htm#177_9">Item_Array</A>, <A HREF="terminal_interface-curses-menus__ads.htm#180_9">Item_Array_Access</A>);
1001    <b>begin</b>
1002       <b>if</b> <A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-menus__ads.htm#183_20">Free_Items</A> <b>then</b>
1003          <b>for</b> <FONT COLOR=red><A NAME="999_14">I</A></FONT> <b>in</b> <A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A>'First .. (<A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A>'Last - 1) <b>loop</b>
1004             <b>if</b> (<A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A> (<A HREF="terminal_interface-curses-menus__adb.htm#999_14">I</A>) /= <A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>) <b>then</b>
1005                <A HREF="terminal_interface-curses-menus__ads.htm#205_14">Delete</A> (<A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A> (<A HREF="terminal_interface-curses-menus__adb.htm#999_14">I</A>));
1006             <b>end</b> <b>if</b>;
1007          <b>end</b> <b>loop</b>;
1008       <b>end</b> <b>if</b>;
1009       <A HREF="terminal_interface-curses-menus__adb.htm#995_17">Release</A> (<A HREF="terminal_interface-curses-menus__ads.htm#182_20">IA</A>);
1010    <b>end</b> Free;
1011
1012 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
1013    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#147_13">Default_Menu_Options</A><FONT COLOR=red><A NAME="1009_13"></A></FONT> <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#121_9">Menu_Option_Set</A>
1014    <b>is</b>
1015    <b>begin</b>
1016       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#354_13">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#63_4">Null_Menu</A>);
1017    <b>end</b> Default_Menu_Options;
1018
1019    <b>function</b> <A HREF="terminal_interface-curses-menus__ads.htm#170_13">Default_Item_Options</A><FONT COLOR=red><A NAME="1015_13"></A></FONT> <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#154_9">Item_Option_Set</A>
1020    <b>is</b>
1021    <b>begin</b>
1022       <b>return</b> <A HREF="terminal_interface-curses-menus__ads.htm#258_13">Get_Options</A> (<A HREF="terminal_interface-curses-menus__ads.htm#62_4">Null_Item</A>);
1023    <b>end</b> Default_Item_Options;
1024 <FONT COLOR=green><EM>-------------------------------------------------------------------------------</EM></FONT>
1025
1026 <b>end</b> Terminal_Interface.Curses.Menus;
1027 </PRE></BODY></HTML>