]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/terminal_interface-curses-forms_s.html
ncurses 4.1
[ncurses.git] / Ada95 / html / terminal_interface-curses-forms_s.html
1 <HTML>
2 <HEAD>
3 <TITLE></TITLE>
4 </HEAD>
5 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
6 <PRE>
7
8 <I>------------------------------------------------------------------------------</I>
9 <I>--                                                                          --</I>
10 <I>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</I>
11 <I>--                                                                          --</I>
12 <I>--                      Terminal_Interface.Curses.Form                      --</I>
13 <I>--                                                                          --</I>
14 <I>--                                 S P E C                                  --</I>
15 <I>--                                                                          --</I>
16 <I>--  Version 00.92                                                           --</I>
17 <I>--                                                                          --</I>
18 <I>--  The ncurses Ada95 binding is copyrighted 1996 by                        --</I>
19 <I>--  <A HREF="http://home.t-online.de/home/Juergen.Pfeifer">J&uuml;rgen Pfeifer</A>, Email: <A HREF="mailto:Juergen.Pfeifer@T-Online.de">Juergen.Pfeifer@T-Online.de</A>                      --</I>
20 <I>--                                                                          --</I>
21 <I>--  Permission is hereby granted to reproduce and distribute this           --</I>
22 <I>--  binding by any means and for any fee, whether alone or as part          --</I>
23 <I>--  of a larger distribution, in source or in binary form, PROVIDED         --</I>
24 <I>--  this notice is included with any such distribution, and is not          --</I>
25 <I>--  removed from any of its header files. Mention of ncurses and the        --</I>
26 <I>--  author of this binding in any applications linked with it is            --</I>
27 <I>--  highly appreciated.                                                     --</I>
28 <I>--                                                                          --</I>
29 <I>--  This binding comes AS IS with no warranty, implied or expressed.        --</I>
30 <I>------------------------------------------------------------------------------</I>
31 <I>--  Version Control:</I>
32 <I>--  @Revision: 1.9 @</I>
33 <I>------------------------------------------------------------------------------</I>
34 <I>--  form binding, generated at Sun Feb  2 17:21:44 1997</I>
35 <I>--  This module is generated. Please don't change it manually!</I>
36 <I>--  Run the generator instead.</I>
37 <I>--  |</I>
38 <B>with</B> System;
39 <B>with</B> Ada.Tags; <B>use</B> Ada.Tags;
40 <B>with</B> Ada.Characters.Latin_1;
41 <B>with</B> Interfaces.C;
42 <B>with</B> Interfaces.C.Strings;
43
44 <B>package</B> Terminal_Interface.Curses.Forms <B>is</B>
45
46    <B>pragma</B> Linker_Options ("-lform");
47
48
49    Space : Character <B>renames</B> Ada.Characters.Latin_1.Space;
50
51    type Field        <B>is</B> <B>private</B>;
52    type Form         <B>is</B> <B>private</B>;
53    type C_Field_Type <B>is</B> <B>private</B>;
54
55    Null_Field        : <B>constant</B> Field;
56    Null_Form         : <B>constant</B> Form;
57    Null_Field_Type   : <B>constant</B> C_Field_Type;
58
59
60    type Field_Justification <B>is</B> (None,
61                                 Left,
62                                 Center,
63                                 Right);
64
65    type Field_Option_Set <B>is</B>
66       <B>record</B>
67          Visible   : Boolean;
68          Active    : Boolean;
69          Public    : Boolean;
70          Edit      : Boolean;
71          Wrap      : Boolean;
72          Blank     : Boolean;
73          Auto_Skip : Boolean;
74          Null_Ok   : Boolean;
75          Pass_Ok   : Boolean;
76          Static    : Boolean;
77          Reserved  : Boolean;
78       <B>end</B> <B>record</B>;
79    <B>pragma</B> Pack (Field_Option_Set);
80    <B>pragma</B> Convention (C, Field_Option_Set);
81
82    <B>for</B> Field_Option_Set <B>use</B>
83       <B>record</B>
84          Visible   <B>at</B> 0 <B>range</B>  0 ..  0;
85          Active    <B>at</B> 0 <B>range</B>  1 ..  1;
86          Public    <B>at</B> 0 <B>range</B>  2 ..  2;
87          Edit      <B>at</B> 0 <B>range</B>  3 ..  3;
88          Wrap      <B>at</B> 0 <B>range</B>  4 ..  4;
89          Blank     <B>at</B> 0 <B>range</B>  5 ..  5;
90          Auto_Skip <B>at</B> 0 <B>range</B>  6 ..  6;
91          Null_Ok   <B>at</B> 0 <B>range</B>  7 ..  7;
92          Pass_Ok   <B>at</B> 0 <B>range</B>  8 ..  8;
93          Static    <B>at</B> 0 <B>range</B>  9 ..  9;
94          Reserved  <B>at</B> 0 <B>range</B> 31 .. 31;
95       <B>end</B> <B>record</B>;
96    <B>for</B> Field_Option_Set'Size <B>use</B> Interfaces.C.int'Size;
97    <I>--  Please note: this rep. clause is generated and may be</I>
98    <I>--               different on your system.</I>
99
100    Default_Field_Options : Field_Option_Set;
101    <I>--  The initial defaults for the field options.</I>
102
103    type Form_Option_Set <B>is</B>
104       <B>record</B>
105          NL_Overload : Boolean;
106          BS_Overload : Boolean;
107          Reserved    : Boolean;
108       <B>end</B> <B>record</B>;
109    <B>pragma</B> Pack (Form_Option_Set);
110    <B>pragma</B> Convention (C, Form_Option_Set);
111
112    <B>for</B> Form_Option_Set <B>use</B>
113       <B>record</B>
114          NL_Overload <B>at</B> 0 <B>range</B>  0 ..  0;
115          BS_Overload <B>at</B> 0 <B>range</B>  1 ..  1;
116          Reserved    <B>at</B> 0 <B>range</B> 31 .. 31;
117       <B>end</B> <B>record</B>;
118    <B>for</B> Form_Option_Set'Size <B>use</B> Interfaces.C.int'Size;
119    <I>--  Please note: this rep. clause is generated and may be</I>
120    <I>--               different on your system.</I>
121
122    Default_Form_Options : Form_Option_Set;
123    <I>--  The initial defaults for the form options.</I>
124
125    type Buffer_Number <B>is</B> <B>new</B> Natural;
126
127    type Field_Array <B>is</B> <B>array</B> (Positive <B>range</B> &lt;&gt;) <B>of</B> <B>aliased</B> Field;
128    <B>pragma</B> Convention (C, Field_Array);
129
130    type Field_Array_Access <B>is</B> <B>access</B> <B>all</B> Field_Array;
131
132    <B>subtype</B> Form_Request_Code <B>is</B> Key_Code <B>range</B> (Key_Max + 1) .. (Key_Max + 57);
133
134    <I>--  The prefix F_ stands for "Form Request"</I>
135    F_Next_Page                : <B>constant</B> Form_Request_Code := Key_Max + 1;
136    F_Previous_Page            : <B>constant</B> Form_Request_Code := Key_Max + 2;
137    F_First_Page               : <B>constant</B> Form_Request_Code := Key_Max + 3;
138    F_Last_Page                : <B>constant</B> Form_Request_Code := Key_Max + 4;
139
140    F_Next_Field               : <B>constant</B> Form_Request_Code := Key_Max + 5;
141    F_Previous_Field           : <B>constant</B> Form_Request_Code := Key_Max + 6;
142    F_First_Field              : <B>constant</B> Form_Request_Code := Key_Max + 7;
143    F_Last_Field               : <B>constant</B> Form_Request_Code := Key_Max + 8;
144    F_Sorted_Next_Field        : <B>constant</B> Form_Request_Code := Key_Max + 9;
145    F_Sorted_Previous_Field    : <B>constant</B> Form_Request_Code := Key_Max + 10;
146    F_Sorted_First_Field       : <B>constant</B> Form_Request_Code := Key_Max + 11;
147    F_Sorted_Last_Field        : <B>constant</B> Form_Request_Code := Key_Max + 12;
148    F_Left_Field               : <B>constant</B> Form_Request_Code := Key_Max + 13;
149    F_Right_Field              : <B>constant</B> Form_Request_Code := Key_Max + 14;
150    F_Up_Field                 : <B>constant</B> Form_Request_Code := Key_Max + 15;
151    F_Down_Field               : <B>constant</B> Form_Request_Code := Key_Max + 16;
152
153    F_Next_Char                : <B>constant</B> Form_Request_Code := Key_Max + 17;
154    F_Previous_Char            : <B>constant</B> Form_Request_Code := Key_Max + 18;
155    F_Next_Line                : <B>constant</B> Form_Request_Code := Key_Max + 19;
156    F_Previous_Line            : <B>constant</B> Form_Request_Code := Key_Max + 20;
157    F_Next_Word                : <B>constant</B> Form_Request_Code := Key_Max + 21;
158    F_Previous_Word            : <B>constant</B> Form_Request_Code := Key_Max + 22;
159    F_Begin_Field              : <B>constant</B> Form_Request_Code := Key_Max + 23;
160    F_End_Field                : <B>constant</B> Form_Request_Code := Key_Max + 24;
161    F_Begin_Line               : <B>constant</B> Form_Request_Code := Key_Max + 25;
162    F_End_Line                 : <B>constant</B> Form_Request_Code := Key_Max + 26;
163    F_Left_Char                : <B>constant</B> Form_Request_Code := Key_Max + 27;
164    F_Right_Char               : <B>constant</B> Form_Request_Code := Key_Max + 28;
165    F_Up_Char                  : <B>constant</B> Form_Request_Code := Key_Max + 29;
166    F_Down_Char                : <B>constant</B> Form_Request_Code := Key_Max + 30;
167
168    F_New_Line                 : <B>constant</B> Form_Request_Code := Key_Max + 31;
169    F_Insert_Char              : <B>constant</B> Form_Request_Code := Key_Max + 32;
170    F_Insert_Line              : <B>constant</B> Form_Request_Code := Key_Max + 33;
171    F_Delete_Char              : <B>constant</B> Form_Request_Code := Key_Max + 34;
172    F_Delete_Previous          : <B>constant</B> Form_Request_Code := Key_Max + 35;
173    F_Delete_Line              : <B>constant</B> Form_Request_Code := Key_Max + 36;
174    F_Delete_Word              : <B>constant</B> Form_Request_Code := Key_Max + 37;
175    F_Clear_EOL                : <B>constant</B> Form_Request_Code := Key_Max + 38;
176    F_Clear_EOF                : <B>constant</B> Form_Request_Code := Key_Max + 39;
177    F_Clear_Field              : <B>constant</B> Form_Request_Code := Key_Max + 40;
178    F_Overlay_Mode             : <B>constant</B> Form_Request_Code := Key_Max + 41;
179    F_Insert_Mode              : <B>constant</B> Form_Request_Code := Key_Max + 42;
180
181    <I>--  Vertical Scrolling</I>
182    F_ScrollForward_Line       : <B>constant</B> Form_Request_Code := Key_Max + 43;
183    F_ScrollBackward_Line      : <B>constant</B> Form_Request_Code := Key_Max + 44;
184    F_ScrollForward_Page       : <B>constant</B> Form_Request_Code := Key_Max + 45;
185    F_ScrollBackward_Page      : <B>constant</B> Form_Request_Code := Key_Max + 46;
186    F_ScrollForward_HalfPage   : <B>constant</B> Form_Request_Code := Key_Max + 47;
187    F_ScrollBackward_HalfPage  : <B>constant</B> Form_Request_Code := Key_Max + 48;
188
189    <I>--  Horizontal Scrolling</I>
190    F_HScrollForward_Char      : <B>constant</B> Form_Request_Code := Key_Max + 49;
191    F_HScrollBackward_Char     : <B>constant</B> Form_Request_Code := Key_Max + 50;
192    F_HScrollForward_Line      : <B>constant</B> Form_Request_Code := Key_Max + 51;
193    F_HScrollBackward_Line     : <B>constant</B> Form_Request_Code := Key_Max + 52;
194    F_HScrollForward_HalfLine  : <B>constant</B> Form_Request_Code := Key_Max + 53;
195    F_HScrollBackward_HalfLine : <B>constant</B> Form_Request_Code := Key_Max + 54;
196
197    F_Validate_Field           : <B>constant</B> Form_Request_Code := Key_Max + 55;
198    F_Next_Choice              : <B>constant</B> Form_Request_Code := Key_Max + 56;
199    F_Previous_Choice          : <B>constant</B> Form_Request_Code := Key_Max + 57;
200
201    <I>--  For those who like the old 'C' style request names</I>
202    REQ_NEXT_PAGE    : Form_Request_Code <B>renames</B> F_Next_Page;
203    REQ_PREV_PAGE    : Form_Request_Code <B>renames</B> F_Previous_Page;
204    REQ_FIRST_PAGE   : Form_Request_Code <B>renames</B> F_First_Page;
205    REQ_LAST_PAGE    : Form_Request_Code <B>renames</B> F_Last_Page;
206
207    REQ_NEXT_FIELD   : Form_Request_Code <B>renames</B> F_Next_Field;
208    REQ_PREV_FIELD   : Form_Request_Code <B>renames</B> F_Previous_Field;
209    REQ_FIRST_FIELD  : Form_Request_Code <B>renames</B> F_First_Field;
210    REQ_LAST_FIELD   : Form_Request_Code <B>renames</B> F_Last_Field;
211    REQ_SNEXT_FIELD  : Form_Request_Code <B>renames</B> F_Sorted_Next_Field;
212    REQ_SPREV_FIELD  : Form_Request_Code <B>renames</B> F_Sorted_Previous_Field;
213    REQ_SFIRST_FIELD : Form_Request_Code <B>renames</B> F_Sorted_First_Field;
214    REQ_SLAST_FIELD  : Form_Request_Code <B>renames</B> F_Sorted_Last_Field;
215    REQ_LEFT_FIELD   : Form_Request_Code <B>renames</B> F_Left_Field;
216    REQ_RIGHT_FIELD  : Form_Request_Code <B>renames</B> F_Right_Field;
217    REQ_UP_FIELD     : Form_Request_Code <B>renames</B> F_Up_Field;
218    REQ_DOWN_FIELD   : Form_Request_Code <B>renames</B> F_Down_Field;
219
220    REQ_NEXT_CHAR    : Form_Request_Code <B>renames</B> F_Next_Char;
221    REQ_PREV_CHAR    : Form_Request_Code <B>renames</B> F_Previous_Char;
222    REQ_NEXT_LINE    : Form_Request_Code <B>renames</B> F_Next_Line;
223    REQ_PREV_LINE    : Form_Request_Code <B>renames</B> F_Previous_Line;
224    REQ_NEXT_WORD    : Form_Request_Code <B>renames</B> F_Next_Word;
225    REQ_PREV_WORD    : Form_Request_Code <B>renames</B> F_Previous_Word;
226    REQ_BEG_FIELD    : Form_Request_Code <B>renames</B> F_Begin_Field;
227    REQ_END_FIELD    : Form_Request_Code <B>renames</B> F_End_Field;
228    REQ_BEG_LINE     : Form_Request_Code <B>renames</B> F_Begin_Line;
229    REQ_END_LINE     : Form_Request_Code <B>renames</B> F_End_Line;
230    REQ_LEFT_CHAR    : Form_Request_Code <B>renames</B> F_Left_Char;
231    REQ_RIGHT_CHAR   : Form_Request_Code <B>renames</B> F_Right_Char;
232    REQ_UP_CHAR      : Form_Request_Code <B>renames</B> F_Up_Char;
233    REQ_DOWN_CHAR    : Form_Request_Code <B>renames</B> F_Down_Char;
234
235    REQ_NEW_LINE     : Form_Request_Code <B>renames</B> F_New_Line;
236    REQ_INS_CHAR     : Form_Request_Code <B>renames</B> F_Insert_Char;
237    REQ_INS_LINE     : Form_Request_Code <B>renames</B> F_Insert_Line;
238    REQ_DEL_CHAR     : Form_Request_Code <B>renames</B> F_Delete_Char;
239    REQ_DEL_PREV     : Form_Request_Code <B>renames</B> F_Delete_Previous;
240    REQ_DEL_LINE     : Form_Request_Code <B>renames</B> F_Delete_Line;
241    REQ_DEL_WORD     : Form_Request_Code <B>renames</B> F_Delete_Word;
242    REQ_CLR_EOL      : Form_Request_Code <B>renames</B> F_Clear_EOL;
243    REQ_CLR_EOF      : Form_Request_Code <B>renames</B> F_Clear_EOF;
244    REQ_CLR_FIELD    : Form_Request_Code <B>renames</B> F_Clear_Field;
245    REQ_OVL_MODE     : Form_Request_Code <B>renames</B> F_Overlay_Mode;
246    REQ_INS_MODE     : Form_Request_Code <B>renames</B> F_Insert_Mode;
247
248    REQ_SCR_FLINE    : Form_Request_Code <B>renames</B> F_ScrollForward_Line;
249    REQ_SCR_BLINE    : Form_Request_Code <B>renames</B> F_ScrollBackward_Line;
250    REQ_SCR_FPAGE    : Form_Request_Code <B>renames</B> F_ScrollForward_Page;
251    REQ_SCR_BPAGE    : Form_Request_Code <B>renames</B> F_ScrollBackward_Page;
252    REQ_SCR_FHPAGE   : Form_Request_Code <B>renames</B> F_ScrollForward_HalfPage;
253    REQ_SCR_BHPAGE   : Form_Request_Code <B>renames</B> F_ScrollBackward_HalfPage;
254
255    REQ_SCR_FCHAR    : Form_Request_Code <B>renames</B> F_HScrollForward_Char;
256    REQ_SCR_BCHAR    : Form_Request_Code <B>renames</B> F_HScrollBackward_Char;
257    REQ_SCR_HFLINE   : Form_Request_Code <B>renames</B> F_HScrollForward_Line;
258    REQ_SCR_HBLINE   : Form_Request_Code <B>renames</B> F_HScrollBackward_Line;
259    REQ_SCR_HFHALF   : Form_Request_Code <B>renames</B> F_HScrollForward_HalfLine;
260    REQ_SCR_HBHALF   : Form_Request_Code <B>renames</B> F_HScrollBackward_HalfLine;
261
262    REQ_VALIDATION   : Form_Request_Code <B>renames</B> F_Validate_Field;
263    REQ_NEXT_CHOICE  : Form_Request_Code <B>renames</B> F_Next_Choice;
264    REQ_PREV_CHOICE  : Form_Request_Code <B>renames</B> F_Previous_Choice;
265
266
267    <B>procedure</B> Request_Name (Key  : <B>in</B> Form_Request_Code;
268                            Name : <B>out</B> String);
269
270    <I>------------------</I>
271    <I>--  Exceptions  --</I>
272    <I>------------------</I>
273    Form_Exception : <B>exception</B>;
274
275    <I>--  |=====================================================================</I>
276    <I>--  | Man page <A HREF="form_field_new.3x.html">form_field_new.3x</A></I>
277    <I>--  |=====================================================================</I>
278
279    <I>--  <A NAME="AFU_1">|</I>
280    <B>function</B> Create (Height       : Line_Count;
281                     Width        : Column_Count;
282                     Top          : Line_Position;
283                     Left         : Column_Position;
284                     Off_Screen   : Natural := 0;
285                     More_Buffers : Buffer_Number := Buffer_Number'First)
286                     <B>return</B> Field;
287    <I>--  AKA: <A HREF="form_field_new.3x.html">new_field()</A></I>
288
289    <I>--  <A NAME="AFU_2">|</I>
290    <B>function</B> New_Field (Height       : Line_Count;
291                        Width        : Column_Count;
292                        Top          : Line_Position;
293                        Left         : Column_Position;
294                        Off_Screen   : Natural := 0;
295                        More_Buffers : Buffer_Number := Buffer_Number'First)
296                        <B>return</B> Field <B>renames</B> Create;
297    <I>--  AKA: <A HREF="form_field_new.3x.html">new_field()</A></I>
298
299    <I>--  <A NAME="AFU_3">|</I>
300    <B>procedure</B> Delete (Fld : <B>in</B> <B>out</B> Field);
301    <I>--  AKA: <A HREF="form_field_new.3x.html">free_field()</A></I>
302    <I>--  Reset Fld to Null_Field</I>
303
304    <I>--  <A NAME="AFU_4">|</I>
305    <B>function</B> Duplicate (Fld  : Field;
306                        Top  : Line_Position;
307                        Left : Column_Position) <B>return</B> Field;
308    <I>--  AKA: <A HREF="form_field_new.3x.html">dup_field()</A></I>
309
310    <I>--  <A NAME="AFU_5">|</I>
311    <B>function</B> Link (Fld  : Field;
312                   Top  : Line_Position;
313                   Left : Column_Position) <B>return</B> Field;
314    <I>--  AKA: <A HREF="form_field_new.3x.html">link_field()</A></I>
315
316    <I>--  |=====================================================================</I>
317    <I>--  | Man page <A HREF="form_field_just.3x.html">form_field_just.3x</A></I>
318    <I>--  |=====================================================================</I>
319
320    <I>--  <A NAME="AFU_6">|</I>
321    <B>procedure</B> Set_Justification (Fld  : <B>in</B> Field;
322                                 Just : <B>in</B> Field_Justification := None);
323    <I>--  AKA: <A HREF="form_field_just.3x.html">set_field_just()</A></I>
324
325    <I>--  <A NAME="AFU_7">|</I>
326    <B>function</B> Get_Justification (Fld : Field) <B>return</B> Field_Justification;
327    <I>--  AKA: <A HREF="form_field_just.3x.html">field_just()</A></I>
328
329    <I>--  |=====================================================================</I>
330    <I>--  | Man page <A HREF="form_field_buffer.3x.html">form_field_buffer.3x</A></I>
331    <I>--  |=====================================================================</I>
332
333    <I>--  <A NAME="AFU_8">|</I>
334    <B>procedure</B> Set_Buffer
335      (Fld    : <B>in</B> Field;
336       Buffer : <B>in</B> Buffer_Number := Buffer_Number'First;
337       Str    : <B>in</B> String);
338    <I>--  AKA: <A HREF="form_field_buffer.3x.html">set_field_buffer()</A></I>
339
340    <I>--  <A NAME="AFU_9">|</I>
341    <B>procedure</B> Get_Buffer
342      (Fld    : <B>in</B> Field;
343       Buffer : <B>in</B> Buffer_Number := Buffer_Number'First;
344       Str    : <B>out</B> String);
345    <I>--  AKA: <A HREF="form_field_buffer.3x.html">field_buffer()</A></I>
346
347    <I>--  <A NAME="AFU_10">|</I>
348    <B>procedure</B> Set_Status (Fld    : <B>in</B> Field;
349                          Status : <B>in</B> Boolean := True);
350    <I>--  AKA: <A HREF="form_field_buffer.3x.html">set_field_status()</A></I>
351
352    <I>--  <A NAME="AFU_11">|</I>
353    <B>function</B> Changed (Fld : Field) <B>return</B> Boolean;
354    <I>--  AKA: <A HREF="form_field_buffer.3x.html">field_status()</A></I>
355
356    <I>--  <A NAME="AFU_12">|</I>
357    <B>procedure</B> Set_Maximum_Size (Fld : <B>in</B> Field;
358                                Max : <B>in</B> Natural := 0);
359    <I>--  AKA: <A HREF="form_field_buffer.3x.html">set_field_max()</A></I>
360
361    <I>--  |=====================================================================</I>
362    <I>--  | Man page <A HREF="form_field_opts.3x.html">form_field_opts.3x</A></I>
363    <I>--  |=====================================================================</I>
364
365    <I>--  <A NAME="AFU_13">|</I>
366    <B>procedure</B> Set_Options (Fld     : <B>in</B> Field;
367                           Options : <B>in</B> Field_Option_Set);
368    <I>--  AKA: <A HREF="form_field_opts.3x.html">set_field_opts()</A></I>
369
370    <I>--  <A NAME="AFU_14">|</I>
371    <B>procedure</B> Switch_Options (Fld     : <B>in</B> Field;
372                              Options : <B>in</B> Field_Option_Set;
373                              On      : Boolean := True);
374    <I>--  AKA: <A HREF="form_field_opts.3x.html">field_opts_on()</A></I>
375    <I>--  AKA: field_opts_off()</I>
376
377    <I>--  <A NAME="AFU_15">|</I>
378    <B>procedure</B> Get_Options (Fld     : <B>in</B>  Field;
379                           Options : <B>out</B> Field_Option_Set);
380    <I>--  AKA: <A HREF="form_field_opts.3x.html">field_opts()</A></I>
381
382    <I>--  <A NAME="AFU_16">|</I>
383    <B>function</B> Get_Options (Fld : Field := Null_Field)
384                          <B>return</B> Field_Option_Set;
385    <I>--  AKA: <A HREF="form_field_opts.3x.html">field_opts()</A></I>
386
387    <I>--  |=====================================================================</I>
388    <I>--  | Man page <A HREF="form_field_attributes.3x.html">form_field_attributes.3x</A></I>
389    <I>--  |=====================================================================</I>
390
391    <I>--  <A NAME="AFU_17">|</I>
392    <B>procedure</B> Set_Foreground
393      (Fld   : <B>in</B> Field;
394       Fore  : <B>in</B> Character_Attribute_Set := Normal_Video;
395       Color : <B>in</B> Color_Pair := Color_Pair'First);
396    <I>--  AKA: <A HREF="form_field_attributes.3x.html">set_field_fore()</A></I>
397
398    <I>--  <A NAME="AFU_18">|</I>
399    <B>procedure</B> Foreground (Fld  : <B>in</B>  Field;
400                          Fore : <B>out</B> Character_Attribute_Set);
401    <I>--  AKA: <A HREF="form_field_attributes.3x.html">field_fore()</A></I>
402
403    <I>--  <A NAME="AFU_19">|</I>
404    <B>procedure</B> Foreground (Fld   : <B>in</B>  Field;
405                          Fore  : <B>out</B> Character_Attribute_Set;
406                          Color : <B>out</B> Color_Pair);
407    <I>--  AKA: <A HREF="form_field_attributes.3x.html">field_fore()</A></I>
408
409    <I>--  <A NAME="AFU_20">|</I>
410    <B>procedure</B> Set_Background
411      (Fld   : <B>in</B> Field;
412       Back  : <B>in</B> Character_Attribute_Set := Normal_Video;
413       Color : <B>in</B> Color_Pair := Color_Pair'First);
414    <I>--  AKA: <A HREF="form_field_attributes.3x.html">set_field_back()</A></I>
415
416    <I>--  <A NAME="AFU_21">|</I>
417    <B>procedure</B> Background (Fld  : <B>in</B>  Field;
418                          Back : <B>out</B> Character_Attribute_Set);
419    <I>--  AKA: <A HREF="form_field_attributes.3x.html">field_back()</A></I>
420
421    <I>--  <A NAME="AFU_22">|</I>
422    <B>procedure</B> Background (Fld   : <B>in</B>  Field;
423                          Back  : <B>out</B> Character_Attribute_Set;
424                          Color : <B>out</B> Color_Pair);
425    <I>--  AKA: <A HREF="form_field_attributes.3x.html">field_back()</A></I>
426
427    <I>--  <A NAME="AFU_23">|</I>
428    <B>procedure</B> Set_Pad_Character (Fld : <B>in</B> Field;
429                                 Pad : <B>in</B> Character := Space);
430    <I>--  AKA: <A HREF="form_field_attributes.3x.html">set_field_pad()</A></I>
431
432    <I>--  <A NAME="AFU_24">|</I>
433    <B>procedure</B> Pad_Character (Fld : <B>in</B>  Field;
434                             Pad : <B>out</B> Character);
435    <I>--  AKA: <A HREF="form_field_attributes.3x.html">field_pad()</A></I>
436
437    <I>--  |=====================================================================</I>
438    <I>--  | Man page <A HREF="form_field_info.3x.html">form_field_info.3x</A></I>
439    <I>--  |=====================================================================</I>
440
441    <I>--  <A NAME="AFU_25">|</I>
442    <B>procedure</B> Info (Fld                : <B>in</B>  Field;
443                    Lines              : <B>out</B> Line_Count;
444                    Columns            : <B>out</B> Column_Count;
445                    First_Row          : <B>out</B> Line_Position;
446                    First_Column       : <B>out</B> Column_Position;
447                    Off_Screen         : <B>out</B> Natural;
448                    Additional_Buffers : <B>out</B> Buffer_Number);
449    <I>--  AKA: <A HREF="form_field_info.3x.html">field_info()</A></I>
450
451    <I>--  <A NAME="AFU_26">|</I>
452    <B>procedure</B> Dynamic_Info (Fld     : <B>in</B> Field;
453                            Lines   : <B>out</B> Line_Count;
454                            Columns : <B>out</B> Column_Count;
455                            Max     : <B>out</B> Natural);
456    <I>--  AKA: <A HREF="form_field_info.3x.html">dynamic_field_info()</A></I>
457
458    <I>--  |=====================================================================</I>
459    <I>--  | Man page <A HREF="form_win.3x.html">form_win.3x</A></I>
460    <I>--  |=====================================================================</I>
461
462    <I>--  <A NAME="AFU_27">|</I>
463    <B>procedure</B> Set_Window (Frm : <B>in</B> Form;
464                          Win : <B>in</B> Window);
465    <I>--  AKA: <A HREF="form_win.3x.html">set_form_win()</A></I>
466
467    <I>--  <A NAME="AFU_28">|</I>
468    <B>function</B> Get_Window (Frm : Form) <B>return</B> Window;
469    <I>--  AKA: <A HREF="form_win.3x.html">form_win()</A></I>
470
471    <I>--  <A NAME="AFU_29">|</I>
472    <B>procedure</B> Set_Sub_Window (Frm : <B>in</B> Form;
473                              Win : <B>in</B> Window);
474    <I>--  AKA: <A HREF="form_win.3x.html">set_form_sub()</A></I>
475
476    <I>--  <A NAME="AFU_30">|</I>
477    <B>function</B> Get_Sub_Window (Frm : Form) <B>return</B> Window;
478    <I>--  AKA: <A HREF="form_win.3x.html">form_sub()</A></I>
479
480    <I>--  <A NAME="AFU_31">|</I>
481    <B>procedure</B> Scale (Frm     : <B>in</B> Form;
482                     Lines   : <B>out</B> Line_Count;
483                     Columns : <B>out</B> Column_Count);
484    <I>--  AKA: <A HREF="form_win.3x.html">scale_form()</A></I>
485
486    <I>--  |=====================================================================</I>
487    <I>--  | Man page <A HREF="form_hook.3x.html">form_hook.3x</A></I>
488    <I>--  |=====================================================================</I>
489
490    type Form_Hook_Function <B>is</B> <B>access</B> <B>procedure</B> (Frm : <B>in</B> Form);
491    <B>pragma</B> Convention (C, Form_Hook_Function);
492
493    <I>--  <A NAME="AFU_32">|</I>
494    <B>procedure</B> Set_Field_Init_Hook (Frm  : <B>in</B> Form;
495                                   Proc : <B>in</B> Form_Hook_Function);
496    <I>--  AKA: <A HREF="form_hook.3x.html">set_field_init()</A></I>
497
498    <I>--  <A NAME="AFU_33">|</I>
499    <B>procedure</B> Set_Field_Term_Hook (Frm  : <B>in</B> Form;
500                                   Proc : <B>in</B> Form_Hook_Function);
501    <I>--  AKA: <A HREF="form_hook.3x.html">set_field_term()</A></I>
502
503    <I>--  <A NAME="AFU_34">|</I>
504    <B>procedure</B> Set_Form_Init_Hook (Frm  : <B>in</B> Form;
505                                  Proc : <B>in</B> Form_Hook_Function);
506    <I>--  AKA: <A HREF="form_hook.3x.html">set_form_init()</A></I>
507
508    <I>--  <A NAME="AFU_35">|</I>
509    <B>procedure</B> Set_Form_Term_Hook (Frm  : <B>in</B> Form;
510                                  Proc : <B>in</B> Form_Hook_Function);
511    <I>--  AKA: <A HREF="form_hook.3x.html">set_form_term()</A></I>
512
513    <I>--  <A NAME="AFU_36">|</I>
514    <B>function</B> Get_Field_Init_Hook (Frm : Form) <B>return</B> Form_Hook_Function;
515    <I>--  AKA: <A HREF="form_hook.3x.html">field_init()</A></I>
516    <B>pragma</B> Import (C, Get_Field_Init_Hook, "field_init");
517
518    <I>--  <A NAME="AFU_37">|</I>
519    <B>function</B> Get_Field_Term_Hook (Frm : Form) <B>return</B> Form_Hook_Function;
520    <I>--  AKA: <A HREF="form_hook.3x.html">field_term()</A></I>
521    <B>pragma</B> Import (C, Get_Field_Term_Hook, "field_term");
522
523    <I>--  <A NAME="AFU_38">|</I>
524    <B>function</B> Get_Form_Init_Hook (Frm : Form) <B>return</B> Form_Hook_Function;
525    <I>--  AKA: <A HREF="form_hook.3x.html">form_init()</A></I>
526    <B>pragma</B> Import (C, Get_Form_Init_Hook, "form_init");
527
528    <I>--  <A NAME="AFU_39">|</I>
529    <B>function</B> Get_Form_Term_Hook (Frm : Form) <B>return</B> Form_Hook_Function;
530    <I>--  AKA: <A HREF="form_hook.3x.html">form_term()</A></I>
531    <B>pragma</B> Import (C, Get_Form_Term_Hook, "form_term");
532
533    <I>--  |=====================================================================</I>
534    <I>--  | Man page <A HREF="form_field.3x.html">form_field.3x</A></I>
535    <I>--  |=====================================================================</I>
536
537    <I>--  <A NAME="AFU_40">|</I>
538    <B>procedure</B> Redefine (Frm  : <B>in</B> Form;
539                        Flds : <B>in</B> Field_Array);
540    <I>--  AKA: <A HREF="form_field.3x.html">set_form_fields()</A></I>
541    <I>--  With a bit more comfort. You don´t need to terminate the Field_Array</I>
542    <I>--  with a null entry. This is handled internally in the binding.</I>
543
544    <I>--  <A NAME="AFU_41">|</I>
545    <B>procedure</B> Set_Fields (Frm  : <B>in</B> Form;
546                          Flds : <B>in</B> Field_Array) <B>renames</B> Redefine;
547    <I>--  AKA: <A HREF="form_field.3x.html">set_form_fields()</A></I>
548
549    <I>--  <A NAME="AFU_42">|</I>
550    <B>function</B> Fields (Frm : Form) <B>return</B> Field_Array_Access;
551    <I>--  AKA: <A HREF="form_field.3x.html">form_fields()</A></I>
552
553    <I>--  <A NAME="AFU_43">|</I>
554    <B>function</B> Field_Count (Frm : Form) <B>return</B> Natural;
555    <I>--  AKA: <A HREF="form_field.3x.html">field_count()</A></I>
556
557    <I>--  <A NAME="AFU_44">|</I>
558    <B>procedure</B> Move (Fld    : <B>in</B> Field;
559                    Line   : <B>in</B> Line_Position;
560                    Column : <B>in</B> Column_Position);
561    <I>--  AKA: <A HREF="form_field.3x.html">move_field()</A></I>
562
563    <I>--  |=====================================================================</I>
564    <I>--  | Man page <A HREF="form_new.3x.html">form_new.3x</A></I>
565    <I>--  |=====================================================================</I>
566
567    <I>--  <A NAME="AFU_45">|</I>
568    <B>function</B> Create (Fields : Field_Array) <B>return</B> Form;
569    <I>--  AKA: <A HREF="form_new.3x.html">new_form()</A></I>
570
571    <I>--  <A NAME="AFU_46">|</I>
572    <B>function</B> New_Form (Fields : Field_Array) <B>return</B> Form <B>renames</B> Create;
573    <I>--  AKA: <A HREF="form_new.3x.html">new_form()</A></I>
574
575    <I>--  <A NAME="AFU_47">|</I>
576    <B>procedure</B> Delete (Frm : <B>in</B> <B>out</B> Form);
577    <I>--  AKA: <A HREF="form_new.3x.html">free_form()</A></I>
578    <I>--  Reset Frm to Null_Form</I>
579
580    <I>--  |=====================================================================</I>
581    <I>--  | Man page <A HREF="form_opts.3x.html">form_opts.3x</A></I>
582    <I>--  |=====================================================================</I>
583
584    <I>--  <A NAME="AFU_48">|</I>
585    <B>procedure</B> Set_Options (Frm     : <B>in</B> Form;
586                           Options : <B>in</B> Form_Option_Set);
587    <I>--  AKA: <A HREF="form_opts.3x.html">set_form_opts()</A></I>
588
589    <I>--  <A NAME="AFU_49">|</I>
590    <B>procedure</B> Switch_Options (Frm     : <B>in</B> Form;
591                              Options : <B>in</B> Form_Option_Set;
592                              On      : Boolean := True);
593    <I>--  AKA: <A HREF="form_opts.3x.html">form_opts_on()</A></I>
594    <I>--  AKA: form_opts_off()</I>
595
596    <I>--  <A NAME="AFU_50">|</I>
597    <B>procedure</B> Get_Options (Frm     : <B>in</B>  Form;
598                           Options : <B>out</B> Form_Option_Set);
599    <I>--  AKA: <A HREF="form_opts.3x.html">form_opts()</A></I>
600
601    <I>--  <A NAME="AFU_51">|</I>
602    <B>function</B> Get_Options (Frm : Form := Null_Form) <B>return</B> Form_Option_Set;
603    <I>--  AKA: <A HREF="form_opts.3x.html">form_opts()</A></I>
604
605    <I>--  |=====================================================================</I>
606    <I>--  | Man page <A HREF="form_post.3x.html">form_post.3x</A></I>
607    <I>--  |=====================================================================</I>
608
609    <I>--  <A NAME="AFU_52">|</I>
610    <B>procedure</B> Post (Frm  : <B>in</B> Form;
611                    Post : <B>in</B> Boolean := True);
612    <I>--  AKA: <A HREF="form_post.3x.html">post_form()</A></I>
613    <I>--  AKA: unpost_form()</I>
614
615    <I>--  |=====================================================================</I>
616    <I>--  | Man page <A HREF="form_cursor.3x.html">form_cursor.3x</A></I>
617    <I>--  |=====================================================================</I>
618
619    <I>--  <A NAME="AFU_53">|</I>
620    <B>procedure</B> Position_Cursor (Frm : Form);
621    <I>--  AKA: <A HREF="form_cursor.3x.html">pos_form_cursor()</A></I>
622
623    <I>--  |=====================================================================</I>
624    <I>--  | Man page <A HREF="form_data.3x.html">form_data.3x</A></I>
625    <I>--  |=====================================================================</I>
626
627    <I>--  <A NAME="AFU_54">|</I>
628    <B>function</B> Data_Ahead (Frm : Form) <B>return</B> Boolean;
629    <I>--  AKA: <A HREF="form_data.3x.html">data_ahead()</A></I>
630
631    <I>--  <A NAME="AFU_55">|</I>
632    <B>function</B> Data_Behind (Frm : Form) <B>return</B> Boolean;
633    <I>--  AKA: <A HREF="form_data.3x.html">data_behind()</A></I>
634
635    <I>--  |=====================================================================</I>
636    <I>--  | Man page <A HREF="form_driver.3x.html">form_driver.3x</A></I>
637    <I>--  |=====================================================================</I>
638
639    type Driver_Result <B>is</B> (Form_Ok,
640                           Request_Denied,
641                           Unknown_Request,
642                           Invalid_Field);
643
644    <I>--  <A NAME="AFU_56">|</I>
645    <B>function</B> Driver (Frm : Form;
646                     Key : Key_Code) <B>return</B> Driver_Result;
647    <I>--  AKA: <A HREF="form_driver.3x.html">form_driver()</A></I>
648
649    <I>--  |=====================================================================</I>
650    <I>--  | Man page <A HREF="form_page.3x.html">form_page.3x</A></I>
651    <I>--  |=====================================================================</I>
652
653    type Page_Number <B>is</B> <B>new</B> Natural;
654
655    <I>--  <A NAME="AFU_57">|</I>
656    <B>procedure</B> Set_Current (Frm : <B>in</B> Form;
657                           Fld : <B>in</B> Field);
658    <I>--  AKA: <A HREF="form_page.3x.html">set_current_field()</A></I>
659
660    <I>--  <A NAME="AFU_58">|</I>
661    <B>function</B> Current (Frm : <B>in</B> Form) <B>return</B> Field;
662    <I>--  AKA: <A HREF="form_page.3x.html">current_field()</A></I>
663
664    <I>--  <A NAME="AFU_59">|</I>
665    <B>procedure</B> Set_Page (Frm  : <B>in</B> Form;
666                        Page : <B>in</B> Page_Number := Page_Number'First);
667    <I>--  AKA: <A HREF="form_page.3x.html">set_form_page()</A></I>
668
669    <I>--  <A NAME="AFU_60">|</I>
670    <B>function</B> Page (Frm : Form) <B>return</B> Page_Number;
671    <I>--  AKA: <A HREF="form_page.3x.html">form_page()</A></I>
672
673    <I>--  <A NAME="AFU_61">|</I>
674    <B>function</B> Get_Index (Fld : Field) <B>return</B> Positive;
675    <I>--  AKA: <A HREF="form_page.3x.html">field_index()</A></I>
676    <I>--  Please note that in this binding we start the numbering of fields</I>
677    <I>--  with 1. So this is number is one more than you get from the low</I>
678    <I>--  level call.</I>
679
680    <I>--  |=====================================================================</I>
681    <I>--  | Man page <A HREF="form_new_page.3x.html">form_new_page.3x</A></I>
682    <I>--  |=====================================================================</I>
683
684    <I>--  <A NAME="AFU_62">|</I>
685    <B>procedure</B> Set_New_Page (Fld      : <B>in</B> Field;
686                            New_Page : <B>in</B> Boolean := True);
687    <I>--  AKA: <A HREF="form_new_page.3x.html">set_new_page()</A></I>
688
689    <I>--  <A NAME="AFU_63">|</I>
690    <B>function</B> Is_New_Page (Fld : Field) <B>return</B> Boolean;
691    <I>--  AKA: <A HREF="form_new_page.3x.html">new_page()</A></I>
692
693    <I>--  |=====================================================================</I>
694    <I>--  | Man page <A HREF="form_fieldtype.3x.html">form_fieldtype.3x</A></I>
695    <I>--  |=====================================================================</I>
696
697    type Field_Type <B>is</B> <B>abstract</B> <B>tagged</B> <B>null</B> <B>record</B>;
698    type Field_Type_Access <B>is</B> <B>access</B> <B>all</B> Field_Type'Class;
699
700    <B>function</B> Native_Type (Ftype : Field_Type)
701                          <B>return</B> C_Field_Type <B>is</B> <B>abstract</B>;
702    <I>--  This function returns the C libraries handle to the field type.</I>
703    <I>--  May be you need this if you want to interface to lower level</I>
704    <I>--  routines in the form library.</I>
705
706    <I>--  <A NAME="AFU_64">|</I>
707    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
708                        Fld_Type : <B>in</B> Field_Type) <B>is</B> <B>abstract</B>;
709    <I>--  AKA: <A HREF="form_fieldtype.3x.html">set_field_type()</A></I>
710    <I>--  But: we hide the vararg mechanism of the C interface. You always</I>
711    <I>--       have to pass a single Field_Type parameter.</I>
712
713    type C_Defined_Field_Type <B>is</B> <B>abstract</B> <B>new</B> Field_Type <B>with</B> <B>null</B> <B>record</B>;
714    <I>--  This is the root of all field typed defined in C, i.e. this are</I>
715    <I>--  the predefined field types in the form library.</I>
716
717    type Alpha_Field <B>is</B> <B>new</B> C_Defined_Field_Type
718       <B>with</B> <B>record</B>
719          Minimum_Field_Width : Natural := 0;
720       <B>end</B> <B>record</B>;
721    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
722                        Fld_Type : <B>in</B> Alpha_Field);
723    <B>function</B> Native_Type (Ftype : Alpha_Field)
724                          <B>return</B> C_Field_Type;
725
726    type Alpha_Numeric_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B>
727       <B>record</B>
728          Minimum_Field_Width : Natural := 0;
729       <B>end</B> <B>record</B>;
730    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
731                        Fld_Type : <B>in</B> Alpha_Numeric_Field);
732    <B>function</B> Native_Type (Ftype : Alpha_Numeric_Field)
733                          <B>return</B> C_Field_Type;
734
735    type Integer_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B>
736       <B>record</B>
737          Precision   : Natural;
738          Lower_Limit : Integer;
739          Upper_Limit : Integer;
740       <B>end</B> <B>record</B>;
741    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
742                        Fld_Type : <B>in</B> Integer_Field);
743    <B>function</B> Native_Type (Ftype : Integer_Field)
744                          <B>return</B> C_Field_Type;
745
746    type Numeric_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B>
747       <B>record</B>
748          Precision   : Natural;
749          Lower_Limit : Float;
750          Upper_Limit : Float;
751       <B>end</B> <B>record</B>;
752    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
753                        Fld_Type : <B>in</B> Numeric_Field);
754    <B>function</B> Native_Type (Ftype : Numeric_Field)
755                          <B>return</B> C_Field_Type;
756
757    type String_Access <B>is</B> <B>access</B> String;
758
759    type Regular_Expression_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B>
760       <B>record</B>
761          Regular_Expression : String_Access;
762       <B>end</B> <B>record</B>;
763    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
764                        Fld_Type : <B>in</B> Regular_Expression_Field);
765    <B>function</B> Native_Type (Ftype : Regular_Expression_Field)
766                          <B>return</B> C_Field_Type;
767
768    type Enum_Array <B>is</B> <B>array</B> (Positive <B>range</B> &lt;&gt;)
769       <B>of</B> String_Access;
770
771    type Enumeration_Info (C : Positive) <B>is</B>
772       <B>record</B>
773          Names                : Enum_Array (1 .. C);
774          Case_Sensitive       : Boolean := False;
775          Match_Must_Be_Unique : Boolean := False;
776       <B>end</B> <B>record</B>;
777
778    type Enumeration_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B> <B>private</B>;
779
780    <B>function</B> Create (Info : Enumeration_Info;
781                     Auto_Release_Names : Boolean := False)
782                     <B>return</B> Enumeration_Field;
783    <I>--  Make an fieldtype from the info. Enumerations are special, because</I>
784    <I>--  they normally don't copy the enum values into a private store, so</I>
785    <I>--  we have to care for the lifetime of the info we provide.</I>
786    <I>--  The Auto_Release_Names flag may be used to automatically releases</I>
787    <I>--  the strings in the Names array of the Enumeration_Info.</I>
788
789    <B>function</B> Make_Enumeration_Type (Info : Enumeration_Info;
790                                    Auto_Release_Names : Boolean := False)
791                                    <B>return</B> Enumeration_Field <B>renames</B> Create;
792
793    <B>procedure</B> Release (Enum : <B>in</B> <B>out</B> Enumeration_Field);
794    <I>--  But we may want to release the field to release the memory allocated</I>
795    <I>--  by it internally. After that the Enumeration field is no longer usable.</I>
796
797    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
798                        Fld_Type : <B>in</B> Enumeration_Field);
799    <B>function</B> Native_Type (Ftype : Enumeration_Field)
800                          <B>return</B> C_Field_Type;
801
802    <I>--  The next type defintions are all ncurses extensions. They are typically</I>
803    <I>--  not available in other curses implementations.</I>
804
805    type Internet_V4_Address_Field <B>is</B> <B>new</B> C_Defined_Field_Type
806      <B>with</B> <B>null</B> <B>record</B>;
807    <B>procedure</B> Set_Type (Fld      : <B>in</B> Field;
808                        Fld_Type : <B>in</B> Internet_V4_Address_Field);
809    <B>function</B> Native_Type (Ftype : Internet_V4_Address_Field)
810                          <B>return</B> C_Field_Type;
811
812
813    type Ada_Defined_Field_Type <B>is</B> <B>abstract</B> <B>new</B> Field_Type <B>with</B> <B>null</B> <B>record</B>;
814    <I>--  This is the root of the mechanism we use to create field types in</I>
815    <I>--  Ada95. You don't have to redefine the Set_Field_Type and</I>
816    <I>--  Native_Field_Type methods, because they work generically on this</I>
817    <I>--  class.</I>
818
819    <B>procedure</B> Set_Type (Fld      : Field;
820                        Fld_Type : Ada_Defined_Field_Type);
821
822    <B>function</B> Native_Type (Ftype : Ada_Defined_Field_Type)
823                          <B>return</B> C_Field_Type;
824
825    <I>--  |=====================================================================</I>
826    <I>--  | Man page <A HREF="form_field_validation.3x.html">form_field_validation.3x</A></I>
827    <I>--  |=====================================================================</I>
828
829    <I>--  <A NAME="AFU_65">|</I>
830    <B>function</B> Get_Type (Fld : <B>in</B> Field) <B>return</B> Field_Type_Access;
831    <I>--  AKA: <A HREF="form_field_validation.3x.html">field_type()</A></I>
832    <I>--  AKA: field_arg()</I>
833    <I>--  In Ada95 we can combine these</I>
834
835 <I>------------------------------------------------------------------------------</I>
836 <B>private</B>
837
838    type Field        <B>is</B> <B>new</B> System.Address;
839    type Form         <B>is</B> <B>new</B> System.Address;
840    type C_Field_Type <B>is</B> <B>new</B> System.Address;
841
842    Null_Field        : <B>constant</B> Field        := Field (System.Null_Address);
843    Null_Form         : <B>constant</B> Form         := Form  (System.Null_Address);
844    Null_Field_Type   : <B>constant</B> C_Field_Type :=
845      C_Field_Type (System.Null_Address);
846
847    type CPA_Access <B>is</B> <B>access</B> Interfaces.C.Strings.chars_ptr_array;
848
849    type Enumeration_Field <B>is</B> <B>new</B> C_Defined_Field_Type <B>with</B>
850       <B>record</B>
851          Case_Sensitive       : Boolean := False;
852          Match_Must_Be_Unique : Boolean := False;
853          Arr                  : CPA_Access := <B>null</B>;
854       <B>end</B> <B>record</B>;
855
856    <I>--  In our binding we use the fields user pointer as hook to maintain</I>
857    <I>--  our own info structure about the field type. To be able to still</I>
858    <I>--  provide a user pointer, we use this wrapper.</I>
859    <I>--</I>
860    type Field_User_Wrapper <B>is</B>
861       <B>record</B>
862          U : System.Address;    <I>--  the hook we provide for the user</I>
863          T : Field_Type_Access; <I>--  may be null</I>
864          N : Natural;           <I>--  use counter</I>
865       <B>end</B> <B>record</B>;
866    <B>pragma</B> Convention (C, Field_User_Wrapper);
867    type Field_User_Wrapper_Access <B>is</B> <B>access</B> <B>all</B> Field_User_Wrapper;
868    <B>pragma</B> Controlled (Field_User_Wrapper_Access);
869
870    <B>function</B> Set_Field_Userptr (Fld : Field;
871                                Wrp : Field_User_Wrapper_Access)
872                                <B>return</B> Interfaces.C.int;
873    <B>pragma</B> Import (C, Set_Field_Userptr, "set_field_userptr");
874
875    <B>function</B> Field_Userptr (Fld : Field) <B>return</B> Field_User_Wrapper_Access;
876    <B>pragma</B> Import (C, Field_Userptr, "field_userptr");
877
878    <I>--  In our binding we use the forms user pointer as hook to maintain</I>
879    <I>--  our own info structure about the field association. To be able to still</I>
880    <I>--  provide a user pointer, we use this wrapper.</I>
881    <I>--</I>
882    type Form_User_Wrapper <B>is</B>
883       <B>record</B>
884          U : System.Address;      <I>--  the hook we provide for the user</I>
885          I : Field_Array_Access;
886       <B>end</B> <B>record</B>;
887    <B>pragma</B> Convention (C, Form_User_Wrapper);
888    type Form_User_Wrapper_Access <B>is</B> <B>access</B> <B>all</B> Form_User_Wrapper;
889    <B>pragma</B> Controlled (Form_User_Wrapper_Access);
890
891    <B>function</B> Set_Form_Userptr (Frm : Form;
892                               Wrp : Form_User_Wrapper_Access)
893                               <B>return</B> Interfaces.C.int;
894    <B>pragma</B> Import (C, Set_Form_Userptr, "set_form_userptr");
895
896    <B>function</B> Form_Userptr (Frm : Form) <B>return</B> Form_User_Wrapper_Access;
897    <B>pragma</B> Import (C, Form_Userptr, "form_userptr");
898
899    <B>procedure</B> Register_Type   (T   : <B>in</B> Ada_Defined_Field_Type'Class;
900                               Cft : <B>in</B> C_Field_Type);
901    <B>procedure</B> Unregister_Type (T   : <B>in</B> Ada_Defined_Field_Type'Class);
902    <B>function</B>  Search_Type (T : Ada_Defined_Field_Type'Class)
903                           <B>return</B> C_Field_Type;
904
905    Generation_Bit_Order : <B>constant</B> System.Bit_Order := System.Low_Order_First;
906    <I>--  This constant may be different on your system.</I>
907
908 <B>end</B> Terminal_Interface.Curses.Forms;
909
910 </PRE>
911
912 <P><HR><P>
913 <P>
914 This is BETA software. The interface is subject to change without notice.<P>
915 <!-- Do NOT delete my name or the tool name from below; -->
916 <!-- giving me credit is a condition of use of ada2html -->
917 <P><I>This hypertext format was generated by <A HREF="http://www.adahome.com/Tutorials/Lovelace/dwheeler.htm">David A. Wheeler</A>'s <A HREF="http://www.adahome.com/Resources/Tools/ada2html/ada2html.htm">ada2html</A></I>
918 </BODY>
919 </HTML>
920