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