2 define(`HTMLNAME',`terminal_interface-curses-forms_s.html')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@T-Online.de> 1996
42 -- Binding Version 00.93
43 ------------------------------------------------------------------------------
44 include(`Form_Base_Defs')
46 with Ada.Characters.Latin_1;
49 package Terminal_Interface.Curses.Forms is
50 pragma Preelaborate (Forms);
51 include(`Form_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,
68 function Default_Field_Options return Field_Option_Set;
69 -- The initial defaults for the field options.
70 pragma Inline (Default_Field_Options);
72 include(`Form_Opt_Rep')
74 function Default_Form_Options return Form_Option_Set;
75 -- The initial defaults for the form options.
76 pragma Inline (Default_Form_Options);
78 type Buffer_Number is new Natural;
80 type Field_Array is array (Positive range <>) of aliased Field;
81 pragma Convention (C, Field_Array);
83 type Field_Array_Access is access Field_Array;
85 procedure Free (FA : in out Field_Array_Access;
86 Free_Fields : in Boolean := False);
87 -- Release the memory for an allocated field array
88 -- If Free_Fields is True, call Delete() for all the fields in
91 subtype Form_Request_Code is Key_Code range (Key_Max + 1) .. (Key_Max + 57);
93 -- The prefix F_ stands for "Form Request"
94 F_Next_Page : constant Form_Request_Code := Key_Max + 1;
95 F_Previous_Page : constant Form_Request_Code := Key_Max + 2;
96 F_First_Page : constant Form_Request_Code := Key_Max + 3;
97 F_Last_Page : constant Form_Request_Code := Key_Max + 4;
99 F_Next_Field : constant Form_Request_Code := Key_Max + 5;
100 F_Previous_Field : constant Form_Request_Code := Key_Max + 6;
101 F_First_Field : constant Form_Request_Code := Key_Max + 7;
102 F_Last_Field : constant Form_Request_Code := Key_Max + 8;
103 F_Sorted_Next_Field : constant Form_Request_Code := Key_Max + 9;
104 F_Sorted_Previous_Field : constant Form_Request_Code := Key_Max + 10;
105 F_Sorted_First_Field : constant Form_Request_Code := Key_Max + 11;
106 F_Sorted_Last_Field : constant Form_Request_Code := Key_Max + 12;
107 F_Left_Field : constant Form_Request_Code := Key_Max + 13;
108 F_Right_Field : constant Form_Request_Code := Key_Max + 14;
109 F_Up_Field : constant Form_Request_Code := Key_Max + 15;
110 F_Down_Field : constant Form_Request_Code := Key_Max + 16;
112 F_Next_Char : constant Form_Request_Code := Key_Max + 17;
113 F_Previous_Char : constant Form_Request_Code := Key_Max + 18;
114 F_Next_Line : constant Form_Request_Code := Key_Max + 19;
115 F_Previous_Line : constant Form_Request_Code := Key_Max + 20;
116 F_Next_Word : constant Form_Request_Code := Key_Max + 21;
117 F_Previous_Word : constant Form_Request_Code := Key_Max + 22;
118 F_Begin_Field : constant Form_Request_Code := Key_Max + 23;
119 F_End_Field : constant Form_Request_Code := Key_Max + 24;
120 F_Begin_Line : constant Form_Request_Code := Key_Max + 25;
121 F_End_Line : constant Form_Request_Code := Key_Max + 26;
122 F_Left_Char : constant Form_Request_Code := Key_Max + 27;
123 F_Right_Char : constant Form_Request_Code := Key_Max + 28;
124 F_Up_Char : constant Form_Request_Code := Key_Max + 29;
125 F_Down_Char : constant Form_Request_Code := Key_Max + 30;
127 F_New_Line : constant Form_Request_Code := Key_Max + 31;
128 F_Insert_Char : constant Form_Request_Code := Key_Max + 32;
129 F_Insert_Line : constant Form_Request_Code := Key_Max + 33;
130 F_Delete_Char : constant Form_Request_Code := Key_Max + 34;
131 F_Delete_Previous : constant Form_Request_Code := Key_Max + 35;
132 F_Delete_Line : constant Form_Request_Code := Key_Max + 36;
133 F_Delete_Word : constant Form_Request_Code := Key_Max + 37;
134 F_Clear_EOL : constant Form_Request_Code := Key_Max + 38;
135 F_Clear_EOF : constant Form_Request_Code := Key_Max + 39;
136 F_Clear_Field : constant Form_Request_Code := Key_Max + 40;
137 F_Overlay_Mode : constant Form_Request_Code := Key_Max + 41;
138 F_Insert_Mode : constant Form_Request_Code := Key_Max + 42;
140 -- Vertical Scrolling
141 F_ScrollForward_Line : constant Form_Request_Code := Key_Max + 43;
142 F_ScrollBackward_Line : constant Form_Request_Code := Key_Max + 44;
143 F_ScrollForward_Page : constant Form_Request_Code := Key_Max + 45;
144 F_ScrollBackward_Page : constant Form_Request_Code := Key_Max + 46;
145 F_ScrollForward_HalfPage : constant Form_Request_Code := Key_Max + 47;
146 F_ScrollBackward_HalfPage : constant Form_Request_Code := Key_Max + 48;
148 -- Horizontal Scrolling
149 F_HScrollForward_Char : constant Form_Request_Code := Key_Max + 49;
150 F_HScrollBackward_Char : constant Form_Request_Code := Key_Max + 50;
151 F_HScrollForward_Line : constant Form_Request_Code := Key_Max + 51;
152 F_HScrollBackward_Line : constant Form_Request_Code := Key_Max + 52;
153 F_HScrollForward_HalfLine : constant Form_Request_Code := Key_Max + 53;
154 F_HScrollBackward_HalfLine : constant Form_Request_Code := Key_Max + 54;
156 F_Validate_Field : constant Form_Request_Code := Key_Max + 55;
157 F_Next_Choice : constant Form_Request_Code := Key_Max + 56;
158 F_Previous_Choice : constant Form_Request_Code := Key_Max + 57;
160 -- For those who like the old 'C' style request names
161 REQ_NEXT_PAGE : Form_Request_Code renames F_Next_Page;
162 REQ_PREV_PAGE : Form_Request_Code renames F_Previous_Page;
163 REQ_FIRST_PAGE : Form_Request_Code renames F_First_Page;
164 REQ_LAST_PAGE : Form_Request_Code renames F_Last_Page;
166 REQ_NEXT_FIELD : Form_Request_Code renames F_Next_Field;
167 REQ_PREV_FIELD : Form_Request_Code renames F_Previous_Field;
168 REQ_FIRST_FIELD : Form_Request_Code renames F_First_Field;
169 REQ_LAST_FIELD : Form_Request_Code renames F_Last_Field;
170 REQ_SNEXT_FIELD : Form_Request_Code renames F_Sorted_Next_Field;
171 REQ_SPREV_FIELD : Form_Request_Code renames F_Sorted_Previous_Field;
172 REQ_SFIRST_FIELD : Form_Request_Code renames F_Sorted_First_Field;
173 REQ_SLAST_FIELD : Form_Request_Code renames F_Sorted_Last_Field;
174 REQ_LEFT_FIELD : Form_Request_Code renames F_Left_Field;
175 REQ_RIGHT_FIELD : Form_Request_Code renames F_Right_Field;
176 REQ_UP_FIELD : Form_Request_Code renames F_Up_Field;
177 REQ_DOWN_FIELD : Form_Request_Code renames F_Down_Field;
179 REQ_NEXT_CHAR : Form_Request_Code renames F_Next_Char;
180 REQ_PREV_CHAR : Form_Request_Code renames F_Previous_Char;
181 REQ_NEXT_LINE : Form_Request_Code renames F_Next_Line;
182 REQ_PREV_LINE : Form_Request_Code renames F_Previous_Line;
183 REQ_NEXT_WORD : Form_Request_Code renames F_Next_Word;
184 REQ_PREV_WORD : Form_Request_Code renames F_Previous_Word;
185 REQ_BEG_FIELD : Form_Request_Code renames F_Begin_Field;
186 REQ_END_FIELD : Form_Request_Code renames F_End_Field;
187 REQ_BEG_LINE : Form_Request_Code renames F_Begin_Line;
188 REQ_END_LINE : Form_Request_Code renames F_End_Line;
189 REQ_LEFT_CHAR : Form_Request_Code renames F_Left_Char;
190 REQ_RIGHT_CHAR : Form_Request_Code renames F_Right_Char;
191 REQ_UP_CHAR : Form_Request_Code renames F_Up_Char;
192 REQ_DOWN_CHAR : Form_Request_Code renames F_Down_Char;
194 REQ_NEW_LINE : Form_Request_Code renames F_New_Line;
195 REQ_INS_CHAR : Form_Request_Code renames F_Insert_Char;
196 REQ_INS_LINE : Form_Request_Code renames F_Insert_Line;
197 REQ_DEL_CHAR : Form_Request_Code renames F_Delete_Char;
198 REQ_DEL_PREV : Form_Request_Code renames F_Delete_Previous;
199 REQ_DEL_LINE : Form_Request_Code renames F_Delete_Line;
200 REQ_DEL_WORD : Form_Request_Code renames F_Delete_Word;
201 REQ_CLR_EOL : Form_Request_Code renames F_Clear_EOL;
202 REQ_CLR_EOF : Form_Request_Code renames F_Clear_EOF;
203 REQ_CLR_FIELD : Form_Request_Code renames F_Clear_Field;
204 REQ_OVL_MODE : Form_Request_Code renames F_Overlay_Mode;
205 REQ_INS_MODE : Form_Request_Code renames F_Insert_Mode;
207 REQ_SCR_FLINE : Form_Request_Code renames F_ScrollForward_Line;
208 REQ_SCR_BLINE : Form_Request_Code renames F_ScrollBackward_Line;
209 REQ_SCR_FPAGE : Form_Request_Code renames F_ScrollForward_Page;
210 REQ_SCR_BPAGE : Form_Request_Code renames F_ScrollBackward_Page;
211 REQ_SCR_FHPAGE : Form_Request_Code renames F_ScrollForward_HalfPage;
212 REQ_SCR_BHPAGE : Form_Request_Code renames F_ScrollBackward_HalfPage;
214 REQ_SCR_FCHAR : Form_Request_Code renames F_HScrollForward_Char;
215 REQ_SCR_BCHAR : Form_Request_Code renames F_HScrollBackward_Char;
216 REQ_SCR_HFLINE : Form_Request_Code renames F_HScrollForward_Line;
217 REQ_SCR_HBLINE : Form_Request_Code renames F_HScrollBackward_Line;
218 REQ_SCR_HFHALF : Form_Request_Code renames F_HScrollForward_HalfLine;
219 REQ_SCR_HBHALF : Form_Request_Code renames F_HScrollBackward_HalfLine;
221 REQ_VALIDATION : Form_Request_Code renames F_Validate_Field;
222 REQ_NEXT_CHOICE : Form_Request_Code renames F_Next_Choice;
223 REQ_PREV_CHOICE : Form_Request_Code renames F_Previous_Choice;
226 procedure Request_Name (Key : in Form_Request_Code;
229 function Request_Name (Key : Form_Request_Code) return String;
231 pragma Inline (Request_Name);
236 Form_Exception : exception;
238 -- MANPAGE(`form_field_new.3x')
240 -- ANCHOR(`new_field()',`Create')
241 function Create (Height : Line_Count;
242 Width : Column_Count;
244 Left : Column_Position;
245 Off_Screen : Natural := 0;
246 More_Buffers : Buffer_Number := Buffer_Number'First)
249 -- An overloaded Create is defined later. Pragma Inline appears there.
251 -- ANCHOR(`new_field()',`New_Field')
252 function New_Field (Height : Line_Count;
253 Width : Column_Count;
255 Left : Column_Position;
256 Off_Screen : Natural := 0;
257 More_Buffers : Buffer_Number := Buffer_Number'First)
258 return Field renames Create;
260 pragma Inline (New_Field);
262 -- ANCHOR(`free_field()',`Delete')
263 procedure Delete (Fld : in out Field);
265 -- Reset Fld to Null_Field
266 -- An overloaded Delete is defined later. Pragma Inline appears there.
268 -- ANCHOR(`dup_field()',`Duplicate')
269 function Duplicate (Fld : Field;
271 Left : Column_Position) return Field;
273 pragma Inline (Duplicate);
275 -- ANCHOR(`link_field()',`Link')
276 function Link (Fld : Field;
278 Left : Column_Position) return Field;
280 pragma Inline (Link);
282 -- MANPAGE(`form_field_just.3x')
284 -- ANCHOR(`set_field_just()',`Set_Justification')
285 procedure Set_Justification (Fld : in Field;
286 Just : in Field_Justification := None);
288 pragma Inline (Set_Justification);
290 -- ANCHOR(`field_just()',`Get_Justification')
291 function Get_Justification (Fld : Field) return Field_Justification;
293 pragma Inline (Get_Justification);
295 -- MANPAGE(`form_field_buffer.3x')
297 -- ANCHOR(`set_field_buffer()',`Set_Buffer')
300 Buffer : in Buffer_Number := Buffer_Number'First;
305 -- ANCHOR(`field_buffer()',`Get_Buffer')
308 Buffer : in Buffer_Number := Buffer_Number'First;
314 Buffer : in Buffer_Number := Buffer_Number'First) return String;
316 -- Same but as function
317 pragma Inline (Get_Buffer);
319 -- ANCHOR(`set_field_status()',`Set_Status')
320 procedure Set_Status (Fld : in Field;
321 Status : in Boolean := True);
323 pragma Inline (Set_Status);
325 -- ANCHOR(`field_status()',`Changed')
326 function Changed (Fld : Field) return Boolean;
328 pragma Inline (Changed);
330 -- ANCHOR(`set_field_max()',`Set_Maximum_Size')
331 procedure Set_Maximum_Size (Fld : in Field;
332 Max : in Natural := 0);
334 pragma Inline (Set_Maximum_Size);
336 -- MANPAGE(`form_field_opts.3x')
338 -- ANCHOR(`set_field_opts()',`Set_Options')
339 procedure Set_Options (Fld : in Field;
340 Options : in Field_Option_Set);
342 -- An overloaded version is defined later. Pragma Inline appears there
344 -- ANCHOR(`field_opts_on()',`Switch_Options')
345 procedure Switch_Options (Fld : in Field;
346 Options : in Field_Option_Set;
347 On : Boolean := True);
349 -- ALIAS(`field_opts_off()')
350 -- An overloaded version is defined later. Pragma Inline appears there
352 -- ANCHOR(`field_opts()',`Get_Options')
353 procedure Get_Options (Fld : in Field;
354 Options : out Field_Option_Set);
357 -- ANCHOR(`field_opts()',`Get_Options')
358 function Get_Options (Fld : Field := Null_Field)
359 return Field_Option_Set;
361 -- An overloaded version is defined later. Pragma Inline appears there
363 -- MANPAGE(`form_field_attributes.3x')
365 -- ANCHOR(`set_field_fore()',`Set_Foreground')
366 procedure Set_Foreground
368 Fore : in Character_Attribute_Set := Normal_Video;
369 Color : in Color_Pair := Color_Pair'First);
371 pragma Inline (Set_Foreground);
373 -- ANCHOR(`field_fore()',`Foreground')
374 procedure Foreground (Fld : in Field;
375 Fore : out Character_Attribute_Set);
378 -- ANCHOR(`field_fore()',`Foreground')
379 procedure Foreground (Fld : in Field;
380 Fore : out Character_Attribute_Set;
381 Color : out Color_Pair);
383 pragma Inline (Foreground);
385 -- ANCHOR(`set_field_back()',`Set_Background')
386 procedure Set_Background
388 Back : in Character_Attribute_Set := Normal_Video;
389 Color : in Color_Pair := Color_Pair'First);
391 pragma Inline (Set_Background);
393 -- ANCHOR(`field_back()',`Background')
394 procedure Background (Fld : in Field;
395 Back : out Character_Attribute_Set);
398 -- ANCHOR(`field_back()',`Background')
399 procedure Background (Fld : in Field;
400 Back : out Character_Attribute_Set;
401 Color : out Color_Pair);
403 pragma Inline (Background);
405 -- ANCHOR(`set_field_pad()',`Set_Pad_Character')
406 procedure Set_Pad_Character (Fld : in Field;
407 Pad : in Character := Space);
409 pragma Inline (Set_Pad_Character);
411 -- ANCHOR(`field_pad()',`Pad_Character')
412 procedure Pad_Character (Fld : in Field;
413 Pad : out Character);
415 pragma Inline (Pad_Character);
417 -- MANPAGE(`form_field_info.3x')
419 -- ANCHOR(`field_info()',`Info')
420 procedure Info (Fld : in Field;
421 Lines : out Line_Count;
422 Columns : out Column_Count;
423 First_Row : out Line_Position;
424 First_Column : out Column_Position;
425 Off_Screen : out Natural;
426 Additional_Buffers : out Buffer_Number);
428 pragma Inline (Info);
430 -- ANCHOR(`dynamic_field_info()',`Dynamic_Info')
431 procedure Dynamic_Info (Fld : in Field;
432 Lines : out Line_Count;
433 Columns : out Column_Count;
436 pragma Inline (Dynamic_Info);
438 -- MANPAGE(`form_win.3x')
440 -- ANCHOR(`set_form_win()',`Set_Window')
441 procedure Set_Window (Frm : in Form;
444 pragma Inline (Set_Window);
446 -- ANCHOR(`form_win()',`Get_Window')
447 function Get_Window (Frm : Form) return Window;
449 pragma Inline (Get_Window);
451 -- ANCHOR(`set_form_sub()',`Set_Sub_Window')
452 procedure Set_Sub_Window (Frm : in Form;
455 pragma Inline (Set_Sub_Window);
457 -- ANCHOR(`form_sub()',`Get_Sub_Window')
458 function Get_Sub_Window (Frm : Form) return Window;
460 pragma Inline (Get_Sub_Window);
462 -- ANCHOR(`scale_form()',`Scale')
463 procedure Scale (Frm : in Form;
464 Lines : out Line_Count;
465 Columns : out Column_Count);
467 pragma Inline (Scale);
469 -- MANPAGE(`form_hook.3x')
471 type Form_Hook_Function is access procedure (Frm : in Form);
472 pragma Convention (C, Form_Hook_Function);
474 -- ANCHOR(`set_field_init()',`Set_Field_Init_Hook')
475 procedure Set_Field_Init_Hook (Frm : in Form;
476 Proc : in Form_Hook_Function);
478 pragma Inline (Set_Field_Init_Hook);
480 -- ANCHOR(`set_field_term()',`Set_Field_Term_Hook')
481 procedure Set_Field_Term_Hook (Frm : in Form;
482 Proc : in Form_Hook_Function);
484 pragma Inline (Set_Field_Term_Hook);
486 -- ANCHOR(`set_form_init()',`Set_Form_Init_Hook')
487 procedure Set_Form_Init_Hook (Frm : in Form;
488 Proc : in Form_Hook_Function);
490 pragma Inline (Set_Form_Init_Hook);
492 -- ANCHOR(`set_form_term()',`Set_Form_Term_Hook')
493 procedure Set_Form_Term_Hook (Frm : in Form;
494 Proc : in Form_Hook_Function);
496 pragma Inline (Set_Form_Term_Hook);
498 -- ANCHOR(`field_init()',`Get_Field_Init_Hook')
499 function Get_Field_Init_Hook (Frm : Form) return Form_Hook_Function;
501 pragma Import (C, Get_Field_Init_Hook, "field_init");
503 -- ANCHOR(`field_term()',`Get_Field_Term_Hook')
504 function Get_Field_Term_Hook (Frm : Form) return Form_Hook_Function;
506 pragma Import (C, Get_Field_Term_Hook, "field_term");
508 -- ANCHOR(`form_init()',`Get_Form_Init_Hook')
509 function Get_Form_Init_Hook (Frm : Form) return Form_Hook_Function;
511 pragma Import (C, Get_Form_Init_Hook, "form_init");
513 -- ANCHOR(`form_term()',`Get_Form_Term_Hook')
514 function Get_Form_Term_Hook (Frm : Form) return Form_Hook_Function;
516 pragma Import (C, Get_Form_Term_Hook, "form_term");
518 -- MANPAGE(`form_field.3x')
520 -- ANCHOR(`set_form_fields()',`Redefine')
521 procedure Redefine (Frm : in Form;
522 Flds : in Field_Array_Access);
524 pragma Inline (Redefine);
526 -- ANCHOR(`set_form_fields()',`Set_Fields')
527 procedure Set_Fields (Frm : in Form;
528 Flds : in Field_Array_Access) renames Redefine;
530 pragma Inline (Set_Fields);
532 -- ANCHOR(`form_fields()',`Fields')
533 function Fields (Frm : Form;
534 Index : Positive) return Field;
536 pragma Inline (Fields);
538 -- ANCHOR(`field_count()',`Field_Count')
539 function Field_Count (Frm : Form) return Natural;
541 pragma Inline (Field_Count);
543 -- ANCHOR(`move_field()',`Move')
544 procedure Move (Fld : in Field;
545 Line : in Line_Position;
546 Column : in Column_Position);
548 pragma Inline (Move);
550 -- MANPAGE(`form_new.3x')
552 -- ANCHOR(`new_form()',`Create')
553 function Create (Fields : Field_Array_Access) return Form;
555 pragma Inline (Create);
557 -- ANCHOR(`new_form()',`New_Form')
558 function New_Form (Fields : Field_Array_Access) return Form
561 pragma Inline (New_Form);
563 -- ANCHOR(`free_form()',`Delete')
564 procedure Delete (Frm : in out Form);
566 -- Reset Frm to Null_Form
567 pragma Inline (Delete);
569 -- MANPAGE(`form_opts.3x')
571 -- ANCHOR(`set_form_opts()',`Set_Options')
572 procedure Set_Options (Frm : in Form;
573 Options : in Form_Option_Set);
575 pragma Inline (Set_Options);
577 -- ANCHOR(`form_opts_on()',`Switch_Options')
578 procedure Switch_Options (Frm : in Form;
579 Options : in Form_Option_Set;
580 On : Boolean := True);
582 -- ALIAS(`form_opts_off()')
583 pragma Inline (Switch_Options);
585 -- ANCHOR(`form_opts()',`Get_Options')
586 procedure Get_Options (Frm : in Form;
587 Options : out Form_Option_Set);
590 -- ANCHOR(`form_opts()',`Get_Options')
591 function Get_Options (Frm : Form := Null_Form) return Form_Option_Set;
593 pragma Inline (Get_Options);
595 -- MANPAGE(`form_post.3x')
597 -- ANCHOR(`post_form()',`Post')
598 procedure Post (Frm : in Form;
599 Post : in Boolean := True);
601 -- ALIAS(`unpost_form()')
602 pragma Inline (Post);
604 -- MANPAGE(`form_cursor.3x')
606 -- ANCHOR(`pos_form_cursor()',`Position_Cursor')
607 procedure Position_Cursor (Frm : Form);
609 pragma Inline (Position_Cursor);
611 -- MANPAGE(`form_data.3x')
613 -- ANCHOR(`data_ahead()',`Data_Ahead')
614 function Data_Ahead (Frm : Form) return Boolean;
616 pragma Inline (Data_Ahead);
618 -- ANCHOR(`data_behind()',`Data_Behind')
619 function Data_Behind (Frm : Form) return Boolean;
621 pragma Inline (Data_Behind);
623 -- MANPAGE(`form_driver.3x')
625 type Driver_Result is (Form_Ok,
630 -- ANCHOR(`form_driver()',`Driver')
631 function Driver (Frm : Form;
632 Key : Key_Code) return Driver_Result;
634 -- Driver not inlined
636 -- MANPAGE(`form_page.3x')
638 type Page_Number is new Natural;
640 -- ANCHOR(`set_current_field()',`Set_Current')
641 procedure Set_Current (Frm : in Form;
644 pragma Inline (Set_Current);
646 -- ANCHOR(`current_field()',`Current')
647 function Current (Frm : in Form) return Field;
649 pragma Inline (Current);
651 -- ANCHOR(`set_form_page()',`Set_Page')
652 procedure Set_Page (Frm : in Form;
653 Page : in Page_Number := Page_Number'First);
655 pragma Inline (Set_Page);
657 -- ANCHOR(`form_page()',`Page')
658 function Page (Frm : Form) return Page_Number;
660 pragma Inline (Page);
662 -- ANCHOR(`field_index()',`Get_Index')
663 function Get_Index (Fld : Field) return Positive;
665 -- Please note that in this binding we start the numbering of fields
666 -- with 1. So this is number is one more than you get from the low
668 pragma Inline (Get_Index);
670 -- MANPAGE(`form_new_page.3x')
672 -- ANCHOR(`set_new_page()',`Set_New_Page')
673 procedure Set_New_Page (Fld : in Field;
674 New_Page : in Boolean := True);
676 pragma Inline (Set_New_Page);
678 -- ANCHOR(`new_page()',`Is_New_Page')
679 function Is_New_Page (Fld : Field) return Boolean;
681 pragma Inline (Is_New_Page);
683 ------------------------------------------------------------------------------
686 type Field is new System.Address;
687 type Form is new System.Address;
689 Null_Field : constant Field := Field (System.Null_Address);
690 Null_Form : constant Form := Form (System.Null_Address);
692 end Terminal_Interface.Curses.Forms;