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 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 <juergen.pfeifer@gmx.net> 1996
42 -- Binding Version 01.00
43 ------------------------------------------------------------------------------
44 include(`Form_Base_Defs')
46 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 : in 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;
232 procedure Request_Name (Key : in Form_Request_Code;
235 function Request_Name (Key : Form_Request_Code) return String;
237 pragma Inline (Request_Name);
242 Form_Exception : exception;
244 -- MANPAGE(`form_field_new.3x')
246 -- ANCHOR(`new_field()',`Create')
247 function Create (Height : Line_Count;
248 Width : Column_Count;
250 Left : Column_Position;
251 Off_Screen : Natural := 0;
252 More_Buffers : Buffer_Number := Buffer_Number'First)
255 -- An overloaded Create is defined later. Pragma Inline appears there.
257 -- ANCHOR(`new_field()',`New_Field')
258 function New_Field (Height : Line_Count;
259 Width : Column_Count;
261 Left : Column_Position;
262 Off_Screen : Natural := 0;
263 More_Buffers : Buffer_Number := Buffer_Number'First)
264 return Field renames Create;
266 pragma Inline (New_Field);
268 -- ANCHOR(`free_field()',`Delete')
269 procedure Delete (Fld : in out Field);
271 -- Reset Fld to Null_Field
272 -- An overloaded Delete is defined later. Pragma Inline appears there.
274 -- ANCHOR(`dup_field()',`Duplicate')
275 function Duplicate (Fld : Field;
277 Left : Column_Position) return Field;
279 pragma Inline (Duplicate);
281 -- ANCHOR(`link_field()',`Link')
282 function Link (Fld : Field;
284 Left : Column_Position) return Field;
286 pragma Inline (Link);
288 -- MANPAGE(`form_field_just.3x')
290 -- ANCHOR(`set_field_just()',`Set_Justification')
291 procedure Set_Justification (Fld : in Field;
292 Just : in Field_Justification := None);
294 pragma Inline (Set_Justification);
296 -- ANCHOR(`field_just()',`Get_Justification')
297 function Get_Justification (Fld : Field) return Field_Justification;
299 pragma Inline (Get_Justification);
301 -- MANPAGE(`form_field_buffer.3x')
303 -- ANCHOR(`set_field_buffer()',`Set_Buffer')
306 Buffer : in Buffer_Number := Buffer_Number'First;
311 -- ANCHOR(`field_buffer()',`Get_Buffer')
314 Buffer : in Buffer_Number := Buffer_Number'First;
320 Buffer : in Buffer_Number := Buffer_Number'First) return String;
322 -- Same but as function
323 pragma Inline (Get_Buffer);
325 -- ANCHOR(`set_field_status()',`Set_Status')
326 procedure Set_Status (Fld : in Field;
327 Status : in Boolean := True);
329 pragma Inline (Set_Status);
331 -- ANCHOR(`field_status()',`Changed')
332 function Changed (Fld : Field) return Boolean;
334 pragma Inline (Changed);
336 -- ANCHOR(`set_field_max()',`Set_Maximum_Size')
337 procedure Set_Maximum_Size (Fld : in Field;
338 Max : in Natural := 0);
340 pragma Inline (Set_Maximum_Size);
342 -- MANPAGE(`form_field_opts.3x')
344 -- ANCHOR(`set_field_opts()',`Set_Options')
345 procedure Set_Options (Fld : in Field;
346 Options : in Field_Option_Set);
348 -- An overloaded version is defined later. Pragma Inline appears there
350 -- ANCHOR(`field_opts_on()',`Switch_Options')
351 procedure Switch_Options (Fld : in Field;
352 Options : in Field_Option_Set;
353 On : Boolean := True);
355 -- ALIAS(`field_opts_off()')
356 -- An overloaded version is defined later. Pragma Inline appears there
358 -- ANCHOR(`field_opts()',`Get_Options')
359 procedure Get_Options (Fld : in Field;
360 Options : out Field_Option_Set);
363 -- ANCHOR(`field_opts()',`Get_Options')
364 function Get_Options (Fld : Field := Null_Field)
365 return Field_Option_Set;
367 -- An overloaded version is defined later. Pragma Inline appears there
369 -- MANPAGE(`form_field_attributes.3x')
371 -- ANCHOR(`set_field_fore()',`Set_Foreground')
372 procedure Set_Foreground
374 Fore : in Character_Attribute_Set := Normal_Video;
375 Color : in Color_Pair := Color_Pair'First);
377 pragma Inline (Set_Foreground);
379 -- ANCHOR(`field_fore()',`Foreground')
380 procedure Foreground (Fld : in Field;
381 Fore : out Character_Attribute_Set);
384 -- ANCHOR(`field_fore()',`Foreground')
385 procedure Foreground (Fld : in Field;
386 Fore : out Character_Attribute_Set;
387 Color : out Color_Pair);
389 pragma Inline (Foreground);
391 -- ANCHOR(`set_field_back()',`Set_Background')
392 procedure Set_Background
394 Back : in Character_Attribute_Set := Normal_Video;
395 Color : in Color_Pair := Color_Pair'First);
397 pragma Inline (Set_Background);
399 -- ANCHOR(`field_back()',`Background')
400 procedure Background (Fld : in Field;
401 Back : out Character_Attribute_Set);
404 -- ANCHOR(`field_back()',`Background')
405 procedure Background (Fld : in Field;
406 Back : out Character_Attribute_Set;
407 Color : out Color_Pair);
409 pragma Inline (Background);
411 -- ANCHOR(`set_field_pad()',`Set_Pad_Character')
412 procedure Set_Pad_Character (Fld : in Field;
413 Pad : in Character := Space);
415 pragma Inline (Set_Pad_Character);
417 -- ANCHOR(`field_pad()',`Pad_Character')
418 procedure Pad_Character (Fld : in Field;
419 Pad : out Character);
421 pragma Inline (Pad_Character);
423 -- MANPAGE(`form_field_info.3x')
425 -- ANCHOR(`field_info()',`Info')
426 procedure Info (Fld : in Field;
427 Lines : out Line_Count;
428 Columns : out Column_Count;
429 First_Row : out Line_Position;
430 First_Column : out Column_Position;
431 Off_Screen : out Natural;
432 Additional_Buffers : out Buffer_Number);
434 pragma Inline (Info);
436 -- ANCHOR(`dynamic_field_info()',`Dynamic_Info')
437 procedure Dynamic_Info (Fld : in Field;
438 Lines : out Line_Count;
439 Columns : out Column_Count;
442 pragma Inline (Dynamic_Info);
444 -- MANPAGE(`form_win.3x')
446 -- ANCHOR(`set_form_win()',`Set_Window')
447 procedure Set_Window (Frm : in Form;
450 pragma Inline (Set_Window);
452 -- ANCHOR(`form_win()',`Get_Window')
453 function Get_Window (Frm : Form) return Window;
455 pragma Inline (Get_Window);
457 -- ANCHOR(`set_form_sub()',`Set_Sub_Window')
458 procedure Set_Sub_Window (Frm : in Form;
461 pragma Inline (Set_Sub_Window);
463 -- ANCHOR(`form_sub()',`Get_Sub_Window')
464 function Get_Sub_Window (Frm : Form) return Window;
466 pragma Inline (Get_Sub_Window);
468 -- ANCHOR(`scale_form()',`Scale')
469 procedure Scale (Frm : in Form;
470 Lines : out Line_Count;
471 Columns : out Column_Count);
473 pragma Inline (Scale);
475 -- MANPAGE(`form_hook.3x')
477 type Form_Hook_Function is access procedure (Frm : in Form);
478 pragma Convention (C, Form_Hook_Function);
480 -- ANCHOR(`set_field_init()',`Set_Field_Init_Hook')
481 procedure Set_Field_Init_Hook (Frm : in Form;
482 Proc : in Form_Hook_Function);
484 pragma Inline (Set_Field_Init_Hook);
486 -- ANCHOR(`set_field_term()',`Set_Field_Term_Hook')
487 procedure Set_Field_Term_Hook (Frm : in Form;
488 Proc : in Form_Hook_Function);
490 pragma Inline (Set_Field_Term_Hook);
492 -- ANCHOR(`set_form_init()',`Set_Form_Init_Hook')
493 procedure Set_Form_Init_Hook (Frm : in Form;
494 Proc : in Form_Hook_Function);
496 pragma Inline (Set_Form_Init_Hook);
498 -- ANCHOR(`set_form_term()',`Set_Form_Term_Hook')
499 procedure Set_Form_Term_Hook (Frm : in Form;
500 Proc : in Form_Hook_Function);
502 pragma Inline (Set_Form_Term_Hook);
504 -- ANCHOR(`field_init()',`Get_Field_Init_Hook')
505 function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
507 pragma Import (C, Get_Field_Init_Hook, "field_init");
509 -- ANCHOR(`field_term()',`Get_Field_Term_Hook')
510 function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
512 pragma Import (C, Get_Field_Term_Hook, "field_term");
514 -- ANCHOR(`form_init()',`Get_Form_Init_Hook')
515 function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
517 pragma Import (C, Get_Form_Init_Hook, "form_init");
519 -- ANCHOR(`form_term()',`Get_Form_Term_Hook')
520 function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
522 pragma Import (C, Get_Form_Term_Hook, "form_term");
524 -- MANPAGE(`form_field.3x')
526 -- ANCHOR(`set_form_fields()',`Redefine')
527 procedure Redefine (Frm : in Form;
528 Flds : in Field_Array_Access);
530 pragma Inline (Redefine);
532 -- ANCHOR(`set_form_fields()',`Set_Fields')
533 procedure Set_Fields (Frm : in Form;
534 Flds : in Field_Array_Access) renames Redefine;
536 pragma Inline (Set_Fields);
538 -- ANCHOR(`form_fields()',`Fields')
539 function Fields (Frm : Form;
540 Index : Positive) return Field;
542 pragma Inline (Fields);
544 -- ANCHOR(`field_count()',`Field_Count')
545 function Field_Count (Frm : Form) return Natural;
547 pragma Inline (Field_Count);
549 -- ANCHOR(`move_field()',`Move')
550 procedure Move (Fld : in Field;
551 Line : in Line_Position;
552 Column : in Column_Position);
554 pragma Inline (Move);
556 -- MANPAGE(`form_new.3x')
558 -- ANCHOR(`new_form()',`Create')
559 function Create (Fields : Field_Array_Access) return Form;
561 pragma Inline (Create);
563 -- ANCHOR(`new_form()',`New_Form')
564 function New_Form (Fields : Field_Array_Access) return Form
567 pragma Inline (New_Form);
569 -- ANCHOR(`free_form()',`Delete')
570 procedure Delete (Frm : in out Form);
572 -- Reset Frm to Null_Form
573 pragma Inline (Delete);
575 -- MANPAGE(`form_opts.3x')
577 -- ANCHOR(`set_form_opts()',`Set_Options')
578 procedure Set_Options (Frm : in Form;
579 Options : in Form_Option_Set);
581 pragma Inline (Set_Options);
583 -- ANCHOR(`form_opts_on()',`Switch_Options')
584 procedure Switch_Options (Frm : in Form;
585 Options : in Form_Option_Set;
586 On : Boolean := True);
588 -- ALIAS(`form_opts_off()')
589 pragma Inline (Switch_Options);
591 -- ANCHOR(`form_opts()',`Get_Options')
592 procedure Get_Options (Frm : in Form;
593 Options : out Form_Option_Set);
596 -- ANCHOR(`form_opts()',`Get_Options')
597 function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
599 pragma Inline (Get_Options);
601 -- MANPAGE(`form_post.3x')
603 -- ANCHOR(`post_form()',`Post')
604 procedure Post (Frm : in Form;
605 Post : in Boolean := True);
607 -- ALIAS(`unpost_form()')
608 pragma Inline (Post);
610 -- MANPAGE(`form_cursor.3x')
612 -- ANCHOR(`pos_form_cursor()',`Position_Cursor')
613 procedure Position_Cursor (Frm : Form);
615 pragma Inline (Position_Cursor);
617 -- MANPAGE(`form_data.3x')
619 -- ANCHOR(`data_ahead()',`Data_Ahead')
620 function Data_Ahead (Frm : Form) return Boolean;
622 pragma Inline (Data_Ahead);
624 -- ANCHOR(`data_behind()',`Data_Behind')
625 function Data_Behind (Frm : Form) return Boolean;
627 pragma Inline (Data_Behind);
629 -- MANPAGE(`form_driver.3x')
631 type Driver_Result is (Form_Ok,
636 -- ANCHOR(`form_driver()',`Driver')
637 function Driver (Frm : Form;
638 Key : Key_Code) return Driver_Result;
640 -- Driver not inlined
642 -- MANPAGE(`form_page.3x')
644 type Page_Number is new Natural;
646 -- ANCHOR(`set_current_field()',`Set_Current')
647 procedure Set_Current (Frm : in Form;
650 pragma Inline (Set_Current);
652 -- ANCHOR(`current_field()',`Current')
653 function Current (Frm : in Form) return Field;
655 pragma Inline (Current);
657 -- ANCHOR(`set_form_page()',`Set_Page')
658 procedure Set_Page (Frm : in Form;
659 Page : in Page_Number := Page_Number'First);
661 pragma Inline (Set_Page);
663 -- ANCHOR(`form_page()',`Page')
664 function Page (Frm : Form) return Page_Number;
666 pragma Inline (Page);
668 -- ANCHOR(`field_index()',`Get_Index')
669 function Get_Index (Fld : Field) return Positive;
671 -- Please note that in this binding we start the numbering of fields
672 -- with 1. So this is number is one more than you get from the low
674 pragma Inline (Get_Index);
676 -- MANPAGE(`form_new_page.3x')
678 -- ANCHOR(`set_new_page()',`Set_New_Page')
679 procedure Set_New_Page (Fld : in Field;
680 New_Page : in Boolean := True);
682 pragma Inline (Set_New_Page);
684 -- ANCHOR(`new_page()',`Is_New_Page')
685 function Is_New_Page (Fld : Field) return Boolean;
687 pragma Inline (Is_New_Page);
689 ------------------------------------------------------------------------------
691 type Field is new System.Storage_Elements.Integer_Address;
692 type Form is new System.Storage_Elements.Integer_Address;
694 Null_Field : constant Field := 0;
695 Null_Form : constant Form := 0;
697 end Terminal_Interface.Curses.Forms;