terminal_interface-curses-menus__adb.htm 141 KB

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