ncurses 5.8 - patch 20110319
[ncurses.git] / doc / html / ada / terminal_interface-curses-forms-field_types__adb.htm
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML><HEAD><TITLE>terminal_interface-curses-forms-field_types.adb</TITLE></HEAD>
3 <BODY>
4 <HR><DIV ALIGN="center"><H1> File : terminal_interface-curses-forms-field_types.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.Forms.Field_Types              --</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-2009,2011 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.22 @</EM></FONT>
44 <FONT COLOR=green><EM>--  @Date: 2011/03/08 01:16:49 @</EM></FONT>
45 <FONT COLOR=green><EM>--  Binding Version 01.00</EM></FONT>
46 <FONT COLOR=green><EM>------------------------------------------------------------------------------</EM></FONT>
47 <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>;
48 <b>with</b> Ada.Unchecked_Deallocation;
49 <b>with</b> Ada.Unchecked_Conversion;
50 <FONT COLOR=green><EM>--  |</EM></FONT>
51 <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
52 <FONT COLOR=green><EM>--  | man page form_fieldtype.3x</EM></FONT>
53 <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
54 <FONT COLOR=green><EM>--  |</EM></FONT>
55 <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>.<A HREF="terminal_interface-curses-forms__ads.htm#ref_49_35">Forms</A>.<FONT COLOR=red><A NAME="ref_50_46" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_43_41">Field_Types</A></FONT> <b>is</b>
56
57    <b>use</b> <b>type</b> System.Address;
58
59    <b>pragma</b> Warnings (Off);
60    <b>function</b> To_Argument_Access <b>is</b> <b>new</b> Ada.Unchecked_Conversion
61      (System.Address, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A>);
62    <b>pragma</b> Warnings (On);
63
64    <b>function</b> <FONT COLOR=red><A NAME="ref_59_13">Get_Fieldtype</A></FONT> (<FONT COLOR=red><A NAME="ref_59_28" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_59_13">F</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
65    <b>pragma</b> Import (C, Get_Fieldtype, "field_type");
66
67    <b>function</b> <FONT COLOR=red><A NAME="ref_62_13">Get_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_62_22" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_62_13">F</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>) <b>return</b> System.Address;
68    <b>pragma</b> Import (C, Get_Arg, "field_arg");
69    <FONT COLOR=green><EM>--  |</EM></FONT>
70    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
71    <FONT COLOR=green><EM>--  | man page form_field_validation.3x</EM></FONT>
72    <FONT COLOR=green><EM>--  |=====================================================================</EM></FONT>
73    <FONT COLOR=green><EM>--  |</EM></FONT>
74    <FONT COLOR=green><EM>--  |</EM></FONT>
75    <FONT COLOR=green><EM>--  |</EM></FONT>
76    <b>function</b> <FONT COLOR=red><A NAME="ref_71_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_79_13">Get_Type</A></FONT> (<FONT COLOR=red><A NAME="ref_71_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_79_23">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_63_9">Field_Type_Access</A>
77    <b>is</b>
78       <FONT COLOR=red><A NAME="ref_73_7">Low_Level</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_59_13">Get_Fieldtype</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_79_23">Fld</A>);
79       <FONT COLOR=red><A NAME="ref_74_7">Arg</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A>;
80    <b>begin</b>
81       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_7">Low_Level</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A> <b>then</b>
82          <b>return</b> <b>null</b>;
83       <b>else</b>
84          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_7">Low_Level</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_143_4">M_Builtin_Router</A> <b>or</b> <b>else</b>
85            <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_7">Low_Level</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_141_4">M_Generic_Type</A> <b>or</b> <b>else</b>
86            <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_7">Low_Level</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_144_4">M_Choice_Router</A> <b>or</b> <b>else</b>
87            <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_73_7">Low_Level</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_142_4">M_Generic_Choice</A> <b>then</b>
88             <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_74_7">Arg</A> := To_Argument_Access (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_62_13">Get_Arg</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_79_23">Fld</A>));
89             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_74_7">Arg</A> = <b>null</b> <b>then</b>
90                <b>raise</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_290_4">Form_Exception</A>;
91             <b>else</b>
92                <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_74_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A>;
93             <b>end</b> <b>if</b>;
94          <b>else</b>
95             <b>raise</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_290_4">Form_Exception</A>;
96          <b>end</b> <b>if</b>;
97       <b>end</b> <b>if</b>;
98    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_79_13">Get_Type</A>;
99
100    <b>function</b> <FONT COLOR=red><A NAME="ref_95_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_95_23" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_23">Usr</A></FONT> : System.Address) <b>return</b> System.Address
101    <b>is</b>
102    <b>begin</b>
103       <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_23">Usr</A>;
104    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>;
105
106    <b>procedure</b> <FONT COLOR=red><A NAME="ref_101_14" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A></FONT> (<FONT COLOR=red><A NAME="ref_101_24" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_24">Usr</A></FONT> : System.Address)
107    <b>is</b>
108       <b>procedure</b> Free_Type <b>is</b> <b>new</b> Ada.Unchecked_Deallocation
109         (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_63_9">Field_Type_Access</A>);
110       <b>procedure</b> Freeargs <b>is</b> <b>new</b> Ada.Unchecked_Deallocation
111         (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_211_9">Argument</A>, <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A>);
112
113       <FONT COLOR=red><A NAME="ref_108_7">To_Be_Free</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A> := To_Argument_Access (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_24">Usr</A>);
114       <FONT COLOR=red><A NAME="ref_109_7">Low_Level</A></FONT>  : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
115    <b>begin</b>
116       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A> /= <b>null</b> <b>then</b>
117          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A> /= System.Null_Address <b>then</b>
118             <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_109_7">Low_Level</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>;
119             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_109_7">Low_Level</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_126_10">Freearg</A> /= <b>null</b> <b>then</b>
120                <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_109_7">Low_Level</A>.<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_109_7">Freearg</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A>);
121             <b>end</b> <b>if</b>;
122          <b>end</b> <b>if</b>;
123          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> /= <b>null</b> <b>then</b>
124             Free_Type (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A>);
125          <b>end</b> <b>if</b>;
126          Freeargs (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_108_7">To_Be_Free</A>);
127       <b>end</b> <b>if</b>;
128    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>;
129
130    <b>procedure</b> <FONT COLOR=red><A NAME="ref_125_14" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_14">Wrap_Builtin</A></FONT> (<FONT COLOR=red><A NAME="ref_125_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_28">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
131                            <FONT COLOR=red><A NAME="ref_126_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_152_28">Typ</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class;
132                            <FONT COLOR=red><A NAME="ref_127_28" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_153_28">Cft</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_148_13">C_Builtin_Router</A>)
133    <b>is</b>
134       <FONT COLOR=red><A NAME="ref_129_7">Usr_Arg</A></FONT>   : <b>constant</b> System.Address := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_62_13">Get_Arg</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_28">Fld</A>);
135       <FONT COLOR=red><A NAME="ref_130_7">Low_Level</A></FONT> : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_59_13">Get_Fieldtype</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_28">Fld</A>);
136       <FONT COLOR=red><A NAME="ref_131_7">Arg</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A>;
137       <FONT COLOR=red><A NAME="ref_132_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
138       <b>function</b> <FONT COLOR=red><A NAME="ref_133_16">Set_Fld_Type</A></FONT> (<FONT COLOR=red><A NAME="ref_133_30" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_133_16">F</A></FONT>    : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_28">Fld</A>;
139                              <FONT COLOR=red><A NAME="ref_134_30" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_133_16">Cf</A></FONT>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_153_28">Cft</A>;
140                              <FONT COLOR=red><A NAME="ref_135_30" HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_133_16">Arg1</A></FONT> : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A>) <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
141       <b>pragma</b> Import (C, Set_Fld_Type, "set_field_type_user");
142
143    <b>begin</b>
144       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_130_7">Low_Level</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>);
145       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_153_28">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_148_13">C_Builtin_Router</A> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_153_28">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_149_13">C_Choice_Router</A> <b>then</b>
146          <b>raise</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_290_4">Form_Exception</A>;
147       <b>else</b>
148          <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_131_7">Arg</A> := <b>new</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_211_9">Argument</A>'(<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A> =&gt; System.Null_Address,
149                               <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> =&gt; <b>new</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_52_9">Field_Type</A>'Class'(<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_152_28">Typ</A>),
150                               <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A> =&gt; <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_59_13">Get_Fieldtype</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_28">Fld</A>));
151          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_129_7">Usr_Arg</A> /= System.Null_Address <b>then</b>
152             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_130_7">Low_Level</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_125_10">Copyarg</A> /= <b>null</b> <b>then</b>
153                <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_131_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_130_7">Low_Level</A>.<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_130_7">Copyarg</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_129_7">Usr_Arg</A>);
154             <b>else</b>
155                <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_131_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_129_7">Usr_Arg</A>;
156             <b>end</b> <b>if</b>;
157          <b>end</b> <b>if</b>;
158
159          <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_132_7">Res</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_133_16">Set_Fld_Type</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_135_30">Arg1</A> =&gt; <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_131_7">Arg</A>);
160          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_132_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
161             <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_132_7">Res</A>);
162          <b>end</b> <b>if</b>;
163       <b>end</b> <b>if</b>;
164    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_151_14">Wrap_Builtin</A>;
165
166    <b>function</b> <FONT COLOR=red><A NAME="ref_161_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_161_33" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_33">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
167                                 <FONT COLOR=red><A NAME="ref_162_33" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_178_33">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1926_9">Curses_Bool</A>
168    <b>is</b>
169       <FONT COLOR=red><A NAME="ref_164_7">Arg</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A> := To_Argument_Access (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_178_33">Usr</A>);
170    <b>begin</b>
171       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>
172                      <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> /= <b>null</b>);
173       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_127_10">Fcheck</A> /= <b>null</b> <b>then</b>
174          <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_127_10">Fcheck</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_33">Fld</A>, <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_164_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A>);
175       <b>else</b>
176          <b>return</b> 1;
177       <b>end</b> <b>if</b>;
178    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A>;
179
180    <b>function</b> <FONT COLOR=red><A NAME="ref_175_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_175_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_32">Ch</A></FONT>  : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_46_12">C_Int</A>;
181                                <FONT COLOR=red><A NAME="ref_176_32" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_186_32">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1926_9">Curses_Bool</A>
182    <b>is</b>
183       <FONT COLOR=red><A NAME="ref_178_7">Arg</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A> := To_Argument_Access (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_186_32">Usr</A>);
184    <b>begin</b>
185       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>
186                      <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> /= <b>null</b>);
187       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_128_10">Ccheck</A> /= <b>null</b> <b>then</b>
188          <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_128_10">Ccheck</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_32">Ch</A>, <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_178_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A>);
189       <b>else</b>
190          <b>return</b> 1;
191       <b>end</b> <b>if</b>;
192    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A>;
193
194    <b>function</b> <FONT COLOR=red><A NAME="ref_189_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_13">Next_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_189_26" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_26">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
195                          <FONT COLOR=red><A NAME="ref_190_26" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_194_26">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1926_9">Curses_Bool</A>
196    <b>is</b>
197       <FONT COLOR=red><A NAME="ref_192_7">Arg</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A> := To_Argument_Access (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_194_26">Usr</A>);
198    <b>begin</b>
199       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>
200                      <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> /= <b>null</b>);
201       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_129_10">Next</A> /= <b>null</b> <b>then</b>
202          <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_129_10">Next</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_26">Fld</A>, <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_192_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A>);
203       <b>else</b>
204          <b>return</b> 1;
205       <b>end</b> <b>if</b>;
206    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_13">Next_Router</A>;
207
208    <b>function</b> <FONT COLOR=red><A NAME="ref_203_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_13">Prev_Router</A></FONT> (<FONT COLOR=red><A NAME="ref_203_26" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_26">Fld</A></FONT> : <A HREF="terminal_interface-curses-forms__ads.htm#ref_56_9">Field</A>;
209                          <FONT COLOR=red><A NAME="ref_204_26" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_202_26">Usr</A></FONT> : System.Address) <b>return</b> <A HREF="terminal_interface-curses__ads.htm#ref_1926_9">Curses_Bool</A>
210    <b>is</b>
211       <FONT COLOR=red><A NAME="ref_206_7">Arg</A></FONT>  : <b>constant</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_216_9">Argument_Access</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_235_41">To_Argument_Access</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_202_26">Usr</A>);
212    <b>begin</b>
213       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A> /= <b>null</b> <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>
214                      <b>and</b> <b>then</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_212_7">Typ</A> /= <b>null</b>);
215       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_129_16">Prev</A> /= <b>null</b> <b>then</b>
216          <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_214_7">Cft</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_129_16">Prev</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_26">Fld</A>, <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_206_7">Arg</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_213_7">Usr</A>);
217       <b>else</b>
218          <b>return</b> 1;
219       <b>end</b> <b>if</b>;
220    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_13">Prev_Router</A>;
221
222    <FONT COLOR=green><EM>--  -----------------------------------------------------------------------</EM></FONT>
223    <FONT COLOR=green><EM>--</EM></FONT>
224    <b>function</b> <FONT COLOR=red><A NAME="ref_219_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_148_13">C_Builtin_Router</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>
225    <b>is</b>
226       <FONT COLOR=red><A NAME="ref_221_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
227       <FONT COLOR=red><A NAME="ref_222_7">T</A></FONT>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
228    <b>begin</b>
229       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_143_4">M_Builtin_Router</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A> <b>then</b>
230          <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_222_7">T</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">New_Fieldtype</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A>'<b>Access</b>,
231                              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A>'<b>Access</b>);
232          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_222_7">T</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A> <b>then</b>
233             <b>raise</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_290_4">Form_Exception</A>;
234          <b>else</b>
235             <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_221_7">Res</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Set_Fieldtype_Arg</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_222_7">T</A>,
236                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A>'<b>Access</b>,
237                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>'<b>Access</b>,
238                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>'<b>Access</b>);
239             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_221_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
240                <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_221_7">Res</A>);
241             <b>end</b> <b>if</b>;
242          <b>end</b> <b>if</b>;
243          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_143_4">M_Builtin_Router</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_222_7">T</A>;
244       <b>end</b> <b>if</b>;
245       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_143_4">M_Builtin_Router</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>);
246       <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_143_4">M_Builtin_Router</A>;
247    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_148_13">C_Builtin_Router</A>;
248
249    <FONT COLOR=green><EM>--  -----------------------------------------------------------------------</EM></FONT>
250    <FONT COLOR=green><EM>--</EM></FONT>
251    <b>function</b> <FONT COLOR=red><A NAME="ref_246_13" HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_149_13">C_Choice_Router</A></FONT> <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>
252    <b>is</b>
253       <FONT COLOR=red><A NAME="ref_248_7">Res</A></FONT> : <A HREF="terminal_interface-curses-aux__ads.htm#ref_78_12">Eti_Error</A>;
254       <FONT COLOR=red><A NAME="ref_249_7">T</A></FONT>   : <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_132_9">C_Field_Type</A>;
255    <b>begin</b>
256       <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_144_4">M_Choice_Router</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A> <b>then</b>
257          <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_249_7">T</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_222_13">New_Fieldtype</A> (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_177_13">Field_Check_Router</A>'<b>Access</b>,
258                              <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_185_13">Char_Check_Router</A>'<b>Access</b>);
259          <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_249_7">T</A> = <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A> <b>then</b>
260             <b>raise</b> <A HREF="terminal_interface-curses-forms__ads.htm#ref_290_4">Form_Exception</A>;
261          <b>else</b>
262             <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_227_13">Set_Fieldtype_Arg</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_249_7">T</A>,
263                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_162_13">Make_Arg</A>'<b>Access</b>,
264                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_167_13">Copy_Arg</A>'<b>Access</b>,
265                                       <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_172_14">Free_Arg</A>'<b>Access</b>);
266             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
267                <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A>);
268             <b>end</b> <b>if</b>;
269
270             <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A> := <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_234_13">Set_Fieldtype_Choice</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_249_7">T</A>,
271                                          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_193_13">Next_Router</A>'<b>Access</b>,
272                                          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_201_13">Prev_Router</A>'<b>Access</b>);
273             <b>if</b> <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A> /= <A HREF="terminal_interface-curses-aux__ads.htm#ref_80_4">E_Ok</A> <b>then</b>
274                <A HREF="terminal_interface-curses-aux__ads.htm#ref_96_14">Eti_Exception</A> (<A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_248_7">Res</A>);
275             <b>end</b> <b>if</b>;
276          <b>end</b> <b>if</b>;
277          <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_144_4">M_Choice_Router</A> := <A HREF="terminal_interface-curses-forms-field_types__adb.htm#ref_249_7">T</A>;
278       <b>end</b> <b>if</b>;
279       <b>pragma</b> Assert (<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_144_4">M_Choice_Router</A> /= <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_134_4">Null_Field_Type</A>);
280       <b>return</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_144_4">M_Choice_Router</A>;
281    <b>end</b> <A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_149_13">C_Choice_Router</A>;
282
283 <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-forms__ads.htm#ref_49_35">Forms</A>.<A HREF="terminal_interface-curses-forms-field_types__ads.htm#ref_43_41">Field_Types</A>;
284 </PRE></BODY></HTML>