2 define(`HTMLNAME',`terminal_interface-curses-forms__ads.htm')dnl
4 ------------------------------------------------------------------------------
6 -- GNAT ncurses Binding --
8 -- Terminal_Interface.Curses.Form --
12 ------------------------------------------------------------------------------
13 -- Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. --
15 -- Permission is hereby granted, free of charge, to any person obtaining a --
16 -- copy of this software and associated documentation files (the --
17 -- "Software"), to deal in the Software without restriction, including --
18 -- without limitation the rights to use, copy, modify, merge, publish, --
19 -- distribute, distribute with modifications, sublicense, and/or sell --
20 -- copies of the Software, and to permit persons to whom the Software is --
21 -- furnished to do so, subject to the following conditions: --
23 -- The above copyright notice and this permission notice shall be included --
24 -- in all copies or substantial portions of the Software. --
26 -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
27 -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
28 -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
29 -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
30 -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
31 -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
32 -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
34 -- Except as contained in this notice, the name(s) of the above copyright --
35 -- holders shall not be used in advertising or otherwise to promote the --
36 -- sale, use or other dealings in this Software without prior written --
38 ------------------------------------------------------------------------------
39 -- Author: Juergen Pfeifer, 1996
42 -- $Date: 2009/12/26 17:31:35 $
43 -- Binding Version 01.00
44 ------------------------------------------------------------------------------
45 include(`Form_Base_Defs')
47 with Ada.Characters.Latin_1;
49 package Terminal_Interface.Curses.Forms is
50 pragma Preelaborate (Terminal_Interface.Curses.Forms);
51 include(`Form_Linker_Options')dnl
52 include(`Linker_Options')
53 Space : Character renames Ada.Characters.Latin_1.Space;
55 type Field is private;
58 Null_Field : constant Field;
59 Null_Form : constant Form;
61 type Field_Justification is (None,
66 pragma Warnings (Off);
67 include(`Field_Rep')Dnl
71 function Default_Field_Options return Field_Option_Set;
72 -- The initial defaults for the field options.
73 pragma Inline (Default_Field_Options);
75 pragma Warnings (Off);
76 include(`Form_Opt_Rep')Dnl
80 function Default_Form_Options return Form_Option_Set;
81 -- The initial defaults for the form options.
82 pragma Inline (Default_Form_Options);
84 type Buffer_Number is new Natural;
86 type Field_Array is array (Positive range <>) of aliased Field;
87 pragma Convention (C, Field_Array);
89 type Field_Array_Access is access Field_Array;
91 procedure Free (FA : in out Field_Array_Access;
92 Free_Fields : Boolean := False);
93 -- Release the memory for an allocated field array
94 -- If Free_Fields is True, call Delete() for all the fields in
97 subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
99 -- The prefix F_ stands for "Form Request"
100 F_Next_Page : constant Form_Request_Code := Key_Max + 1;
101 F_Previous_Page : constant Form_Request_Code := Key_Max + 2;
102 F_First_Page : constant Form_Request_Code := Key_Max + 3;
103 F_Last_Page : constant Form_Request_Code := Key_Max + 4;
105 F_Next_Field : constant Form_Request_Code := Key_Max + 5;
106 F_Previous_Field : constant Form_Request_Code := Key_Max + 6;
107 F_First_Field : constant Form_Request_Code := Key_Max + 7;
108 F_Last_Field : constant Form_Request_Code := Key_Max + 8;
109 F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9;
110 F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10;
111 F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11;
112 F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12;
113 F_Left_Field : constant Form_Request_Code := Key_Max + 13;
114 F_Right_Field : constant Form_Request_Code := Key_Max + 14;
115 F_Up_Field : constant Form_Request_Code := Key_Max + 15;
116 F_Down_Field : constant Form_Request_Code := Key_Max + 16;
118 F_Next_Char : constant Form_Request_Code := Key_Max + 17;
119 F_Previous_Char : constant Form_Request_Code := Key_Max + 18;
120 F_Next_Line : constant Form_Request_Code := Key_Max + 19;
121 F_Previous_Line : constant Form_Request_Code := Key_Max + 20;
122 F_Next_Word : constant Form_Request_Code := Key_Max + 21;
123 F_Previous_Word : constant Form_Request_Code := Key_Max + 22;
124 F_Begin_Field : constant Form_Request_Code := Key_Max + 23;
125 F_End_Field : constant Form_Request_Code := Key_Max + 24;
126 F_Begin_Line : constant Form_Request_Code := Key_Max + 25;
127 F_End_Line : constant Form_Request_Code := Key_Max + 26;
128 F_Left_Char : constant Form_Request_Code := Key_Max + 27;
129 F_Right_Char : constant Form_Request_Code := Key_Max + 28;
130 F_Up_Char : constant Form_Request_Code := Key_Max + 29;
131 F_Down_Char : constant Form_Request_Code := Key_Max + 30;
133 F_New_Line : constant Form_Request_Code := Key_Max + 31;
134 F_Insert_Char : constant Form_Request_Code := Key_Max + 32;
135 F_Insert_Line : constant Form_Request_Code := Key_Max + 33;
136 F_Delete_Char : constant Form_Request_Code := Key_Max + 34;
137 F_Delete_Previous : constant Form_Request_Code := Key_Max + 35;
138 F_Delete_Line : constant Form_Request_Code := Key_Max + 36;
139 F_Delete_Word : constant Form_Request_Code := Key_Max + 37;
140 F_Clear_EOL : constant Form_Request_Code := Key_Max + 38;
141 F_Clear_EOF : constant Form_Request_Code := Key_Max + 39;
142 F_Clear_Field : constant Form_Request_Code := Key_Max + 40;
143 F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41;
144 F_Insert_Mode : constant Form_Request_Code := Key_Max + 42;
146 -- Vertical Scrolling
147 F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43;
148 F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44;
149 F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45;
150 F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46;
151 F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47;
152 F_ScrollBackward_HalfPage : constant Form_Request_Code := Key_Max + 48;
154 -- Horizontal Scrolling
155 F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49;
156 F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50;
157 F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51;
158 F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52;
159 F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53;
160 F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
162 F_Validate_Field : constant Form_Request_Code := Key_Max + 55;
163 F_Next_Choice : constant Form_Request_Code := Key_Max + 56;
164 F_Previous_Choice : constant Form_Request_Code := Key_Max + 57;
166 -- For those who like the old 'C' style request names
167 REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page;
168 REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page;
169 REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page;
170 REQ_LAST_PAGE : Form_Request_Code renames F_Last_Page;
172 REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field;
173 REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field;
174 REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field;
175 REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field;
176 REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field;
177 REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field;
178 REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
179 REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field;
180 REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field;
181 REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field;
182 REQ_UP_FIELD : Form_Request_Code renames F_Up_Field;
183 REQ_DOWN_FIELD : Form_Request_Code renames F_Down_Field;
185 REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char;
186 REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char;
187 REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line;
188 REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line;
189 REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word;
190 REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word;
191 REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field;
192 REQ_END_FIELD : Form_Request_Code renames F_End_Field;
193 REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line;
194 REQ_END_LINE : Form_Request_Code renames F_End_Line;
195 REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char;
196 REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char;
197 REQ_UP_CHAR : Form_Request_Code renames F_Up_Char;
198 REQ_DOWN_CHAR : Form_Request_Code renames F_Down_Char;
200 REQ_NEW_LINE : Form_Request_Code renames F_New_Line;
201 REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char;
202 REQ_INS_LINE : Form_Request_Code renames F_Insert_Line;
203 REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char;
204 REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous;
205 REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line;
206 REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word;
207 REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL;
208 REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF;
209 REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field;
210 REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode;
211 REQ_INS_MODE : Form_Request_Code renames F_Insert_Mode;
213 REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line;
214 REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line;
215 REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page;
216 REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page;
217 REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage;
218 REQ_SCR_BHPAGE : Form_Request_Code renames F_ScrollBackward_HalfPage;
220 REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char;
221 REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char;
222 REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line;
223 REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line;
224 REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine;
225 REQ_SCR_HBHALF : Form_Request_Code renames F_HScrollBackward_HalfLine;
227 REQ_VALIDATION : Form_Request_Code renames F_Validate_Field;
228 REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice;
229 REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice;
231 procedure Request_Name (Key : Form_Request_Code;
234 function Request_Name (Key : Form_Request_Code) return String;
236 pragma Inline (Request_Name);
241 Form_Exception : exception;
243 -- MANPAGE(`form_field_new.3x')
245 -- ANCHOR(`new_field()',`Create')
246 function Create (Height : Line_Count;
247 Width : Column_Count;
249 Left : Column_Position;
250 Off_Screen : Natural := 0;
251 More_Buffers : Buffer_Number := Buffer_Number'First)
254 -- An overloaded Create is defined later. Pragma Inline appears there.
256 -- ANCHOR(`new_field()',`New_Field')
257 function New_Field (Height : Line_Count;
258 Width : Column_Count;
260 Left : Column_Position;
261 Off_Screen : Natural := 0;
262 More_Buffers : Buffer_Number := Buffer_Number'First)
263 return Field renames Create;
265 pragma Inline (New_Field);
267 -- ANCHOR(`free_field()',`Delete')
268 procedure Delete (Fld : in out Field);
270 -- Reset Fld to Null_Field
271 -- An overloaded Delete is defined later. Pragma Inline appears there.
273 -- ANCHOR(`dup_field()',`Duplicate')
274 function Duplicate (Fld : Field;
276 Left : Column_Position) return Field;
278 pragma Inline (Duplicate);
280 -- ANCHOR(`link_field()',`Link')
281 function Link (Fld : Field;
283 Left : Column_Position) return Field;
285 pragma Inline (Link);
287 -- MANPAGE(`form_field_just.3x')
289 -- ANCHOR(`set_field_just()',`Set_Justification')
290 procedure Set_Justification (Fld : Field;
291 Just : Field_Justification := None);
293 pragma Inline (Set_Justification);
295 -- ANCHOR(`field_just()',`Get_Justification')
296 function Get_Justification (Fld : Field) return Field_Justification;
298 pragma Inline (Get_Justification);
300 -- MANPAGE(`form_field_buffer.3x')
302 -- ANCHOR(`set_field_buffer()',`Set_Buffer')
305 Buffer : Buffer_Number := Buffer_Number'First;
310 -- ANCHOR(`field_buffer()',`Get_Buffer')
313 Buffer : Buffer_Number := Buffer_Number'First;
319 Buffer : Buffer_Number := Buffer_Number'First) return String;
321 -- Same but as function
322 pragma Inline (Get_Buffer);
324 -- ANCHOR(`set_field_status()',`Set_Status')
325 procedure Set_Status (Fld : Field;
326 Status : Boolean := True);
328 pragma Inline (Set_Status);
330 -- ANCHOR(`field_status()',`Changed')
331 function Changed (Fld : Field) return Boolean;
333 pragma Inline (Changed);
335 -- ANCHOR(`set_field_max()',`Set_Maximum_Size')
336 procedure Set_Maximum_Size (Fld : Field;
339 pragma Inline (Set_Maximum_Size);
341 -- MANPAGE(`form_field_opts.3x')
343 -- ANCHOR(`set_field_opts()',`Set_Options')
344 procedure Set_Options (Fld : Field;
345 Options : Field_Option_Set);
347 -- An overloaded version is defined later. Pragma Inline appears there
349 -- ANCHOR(`field_opts_on()',`Switch_Options')
350 procedure Switch_Options (Fld : Field;
351 Options : Field_Option_Set;
352 On : Boolean := True);
354 -- ALIAS(`field_opts_off()')
355 -- An overloaded version is defined later. Pragma Inline appears there
357 -- ANCHOR(`field_opts()',`Get_Options')
358 procedure Get_Options (Fld : Field;
359 Options : out Field_Option_Set);
362 -- ANCHOR(`field_opts()',`Get_Options')
363 function Get_Options (Fld : Field := Null_Field)
364 return Field_Option_Set;
366 -- An overloaded version is defined later. Pragma Inline appears there
368 -- MANPAGE(`form_field_attributes.3x')
370 -- ANCHOR(`set_field_fore()',`Set_Foreground')
371 procedure Set_Foreground
373 Fore : Character_Attribute_Set := Normal_Video;
374 Color : Color_Pair := Color_Pair'First);
376 pragma Inline (Set_Foreground);
378 -- ANCHOR(`field_fore()',`Foreground')
379 procedure Foreground (Fld : Field;
380 Fore : out Character_Attribute_Set);
383 -- ANCHOR(`field_fore()',`Foreground')
384 procedure Foreground (Fld : Field;
385 Fore : out Character_Attribute_Set;
386 Color : out Color_Pair);
388 pragma Inline (Foreground);
390 -- ANCHOR(`set_field_back()',`Set_Background')
391 procedure Set_Background
393 Back : Character_Attribute_Set := Normal_Video;
394 Color : Color_Pair := Color_Pair'First);
396 pragma Inline (Set_Background);
398 -- ANCHOR(`field_back()',`Background')
399 procedure Background (Fld : Field;
400 Back : out Character_Attribute_Set);
403 -- ANCHOR(`field_back()',`Background')
404 procedure Background (Fld : Field;
405 Back : out Character_Attribute_Set;
406 Color : out Color_Pair);
408 pragma Inline (Background);
410 -- ANCHOR(`set_field_pad()',`Set_Pad_Character')
411 procedure Set_Pad_Character (Fld : Field;
412 Pad : Character := Space);
414 pragma Inline (Set_Pad_Character);
416 -- ANCHOR(`field_pad()',`Pad_Character')
417 procedure Pad_Character (Fld : Field;
418 Pad : out Character);
420 pragma Inline (Pad_Character);
422 -- MANPAGE(`form_field_info.3x')
424 -- ANCHOR(`field_info()',`Info')
425 procedure Info (Fld : Field;
426 Lines : out Line_Count;
427 Columns : out Column_Count;
428 First_Row : out Line_Position;
429 First_Column : out Column_Position;
430 Off_Screen : out Natural;
431 Additional_Buffers : out Buffer_Number);
433 pragma Inline (Info);
435 -- ANCHOR(`dynamic_field_info()',`Dynamic_Info')
436 procedure Dynamic_Info (Fld : Field;
437 Lines : out Line_Count;
438 Columns : out Column_Count;
441 pragma Inline (Dynamic_Info);
443 -- MANPAGE(`form_win.3x')
445 -- ANCHOR(`set_form_win()',`Set_Window')
446 procedure Set_Window (Frm : Form;
449 pragma Inline (Set_Window);
451 -- ANCHOR(`form_win()',`Get_Window')
452 function Get_Window (Frm : Form) return Window;
454 pragma Inline (Get_Window);
456 -- ANCHOR(`set_form_sub()',`Set_Sub_Window')
457 procedure Set_Sub_Window (Frm : Form;
460 pragma Inline (Set_Sub_Window);
462 -- ANCHOR(`form_sub()',`Get_Sub_Window')
463 function Get_Sub_Window (Frm : Form) return Window;
465 pragma Inline (Get_Sub_Window);
467 -- ANCHOR(`scale_form()',`Scale')
468 procedure Scale (Frm : Form;
469 Lines : out Line_Count;
470 Columns : out Column_Count);
472 pragma Inline (Scale);
474 -- MANPAGE(`form_hook.3x')
476 type Form_Hook_Function is access procedure (Frm : Form);
477 pragma Convention (C, Form_Hook_Function);
479 -- ANCHOR(`set_field_init()',`Set_Field_Init_Hook')
480 procedure Set_Field_Init_Hook (Frm : Form;
481 Proc : Form_Hook_Function);
483 pragma Inline (Set_Field_Init_Hook);
485 -- ANCHOR(`set_field_term()',`Set_Field_Term_Hook')
486 procedure Set_Field_Term_Hook (Frm : Form;
487 Proc : Form_Hook_Function);
489 pragma Inline (Set_Field_Term_Hook);
491 -- ANCHOR(`set_form_init()',`Set_Form_Init_Hook')
492 procedure Set_Form_Init_Hook (Frm : Form;
493 Proc : Form_Hook_Function);
495 pragma Inline (Set_Form_Init_Hook);
497 -- ANCHOR(`set_form_term()',`Set_Form_Term_Hook')
498 procedure Set_Form_Term_Hook (Frm : Form;
499 Proc : Form_Hook_Function);
501 pragma Inline (Set_Form_Term_Hook);
503 -- ANCHOR(`field_init()',`Get_Field_Init_Hook')
504 function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
506 pragma Import (C, Get_Field_Init_Hook, "field_init");
508 -- ANCHOR(`field_term()',`Get_Field_Term_Hook')
509 function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
511 pragma Import (C, Get_Field_Term_Hook, "field_term");
513 -- ANCHOR(`form_init()',`Get_Form_Init_Hook')
514 function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
516 pragma Import (C, Get_Form_Init_Hook, "form_init");
518 -- ANCHOR(`form_term()',`Get_Form_Term_Hook')
519 function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
521 pragma Import (C, Get_Form_Term_Hook, "form_term");
523 -- MANPAGE(`form_field.3x')
525 -- ANCHOR(`set_form_fields()',`Redefine')
526 procedure Redefine (Frm : Form;
527 Flds : Field_Array_Access);
529 pragma Inline (Redefine);
531 -- ANCHOR(`set_form_fields()',`Set_Fields')
532 procedure Set_Fields (Frm : Form;
533 Flds : Field_Array_Access) renames Redefine;
535 -- pragma Inline (Set_Fields);
537 -- ANCHOR(`form_fields()',`Fields')
538 function Fields (Frm : Form;
539 Index : Positive) return Field;
541 pragma Inline (Fields);
543 -- ANCHOR(`field_count()',`Field_Count')
544 function Field_Count (Frm : Form) return Natural;
546 pragma Inline (Field_Count);
548 -- ANCHOR(`move_field()',`Move')
549 procedure Move (Fld : Field;
550 Line : Line_Position;
551 Column : Column_Position);
553 pragma Inline (Move);
555 -- MANPAGE(`form_new.3x')
557 -- ANCHOR(`new_form()',`Create')
558 function Create (Fields : Field_Array_Access) return Form;
560 pragma Inline (Create);
562 -- ANCHOR(`new_form()',`New_Form')
563 function New_Form (Fields : Field_Array_Access) return Form
566 -- pragma Inline (New_Form);
568 -- ANCHOR(`free_form()',`Delete')
569 procedure Delete (Frm : in out Form);
571 -- Reset Frm to Null_Form
572 pragma Inline (Delete);
574 -- MANPAGE(`form_opts.3x')
576 -- ANCHOR(`set_form_opts()',`Set_Options')
577 procedure Set_Options (Frm : Form;
578 Options : Form_Option_Set);
580 pragma Inline (Set_Options);
582 -- ANCHOR(`form_opts_on()',`Switch_Options')
583 procedure Switch_Options (Frm : Form;
584 Options : Form_Option_Set;
585 On : Boolean := True);
587 -- ALIAS(`form_opts_off()')
588 pragma Inline (Switch_Options);
590 -- ANCHOR(`form_opts()',`Get_Options')
591 procedure Get_Options (Frm : Form;
592 Options : out Form_Option_Set);
595 -- ANCHOR(`form_opts()',`Get_Options')
596 function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
598 pragma Inline (Get_Options);
600 -- MANPAGE(`form_post.3x')
602 -- ANCHOR(`post_form()',`Post')
603 procedure Post (Frm : Form;
604 Post : Boolean := True);
606 -- ALIAS(`unpost_form()')
607 pragma Inline (Post);
609 -- MANPAGE(`form_cursor.3x')
611 -- ANCHOR(`pos_form_cursor()',`Position_Cursor')
612 procedure Position_Cursor (Frm : Form);
614 pragma Inline (Position_Cursor);
616 -- MANPAGE(`form_data.3x')
618 -- ANCHOR(`data_ahead()',`Data_Ahead')
619 function Data_Ahead (Frm : Form) return Boolean;
621 pragma Inline (Data_Ahead);
623 -- ANCHOR(`data_behind()',`Data_Behind')
624 function Data_Behind (Frm : Form) return Boolean;
626 pragma Inline (Data_Behind);
628 -- MANPAGE(`form_driver.3x')
630 type Driver_Result is (Form_Ok,
635 -- ANCHOR(`form_driver()',`Driver')
636 function Driver (Frm : Form;
637 Key : Key_Code) return Driver_Result;
639 -- Driver not inlined
641 -- MANPAGE(`form_page.3x')
643 type Page_Number is new Natural;
645 -- ANCHOR(`set_current_field()',`Set_Current')
646 procedure Set_Current (Frm : Form;
649 pragma Inline (Set_Current);
651 -- ANCHOR(`current_field()',`Current')
652 function Current (Frm : Form) return Field;
654 pragma Inline (Current);
656 -- ANCHOR(`set_form_page()',`Set_Page')
657 procedure Set_Page (Frm : Form;
658 Page : Page_Number := Page_Number'First);
660 pragma Inline (Set_Page);
662 -- ANCHOR(`form_page()',`Page')
663 function Page (Frm : Form) return Page_Number;
665 pragma Inline (Page);
667 -- ANCHOR(`field_index()',`Get_Index')
668 function Get_Index (Fld : Field) return Positive;
670 -- Please note that in this binding we start the numbering of fields
671 -- with 1. So this is number is one more than you get from the low
673 pragma Inline (Get_Index);
675 -- MANPAGE(`form_new_page.3x')
677 -- ANCHOR(`set_new_page()',`Set_New_Page')
678 procedure Set_New_Page (Fld : Field;
679 New_Page : Boolean := True);
681 pragma Inline (Set_New_Page);
683 -- ANCHOR(`new_page()',`Is_New_Page')
684 function Is_New_Page (Fld : Field) return Boolean;
686 pragma Inline (Is_New_Page);
688 -- MANPAGE(`form_requestname.3x')
689 -- Not Implemented: form_request_name, form_request_by_name
691 ------------------------------------------------------------------------------
693 type Field is new System.Storage_Elements.Integer_Address;
694 type Form is new System.Storage_Elements.Integer_Address;
696 Null_Field : constant Field := 0;
697 Null_Form : constant Form := 0;
699 end Terminal_Interface.Curses.Forms;