5 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
7 <I>------------------------------------------------------------------------------</I>
9 <I>-- <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding --</I>
11 <I>-- Terminal_Interface.Curses.Text_IO --</I>
15 <I>------------------------------------------------------------------------------</I>
16 <I>-- Copyright (c) 1998 Free Software Foundation, Inc. --</I>
18 <I>-- Permission is hereby granted, free of charge, to any person obtaining a --</I>
19 <I>-- copy of this software and associated documentation files (the --</I>
20 <I>-- "Software"), to deal in the Software without restriction, including --</I>
21 <I>-- without limitation the rights to use, copy, modify, merge, publish, --</I>
22 <I>-- distribute, distribute with modifications, sublicense, and/or sell --</I>
23 <I>-- copies of the Software, and to permit persons to whom the Software is --</I>
24 <I>-- furnished to do so, subject to the following conditions: --</I>
26 <I>-- The above copyright notice and this permission notice shall be included --</I>
27 <I>-- in all copies or substantial portions of the Software. --</I>
29 <I>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --</I>
30 <I>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --</I>
31 <I>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --</I>
32 <I>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --</I>
33 <I>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --</I>
34 <I>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --</I>
35 <I>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --</I>
37 <I>-- Except as contained in this notice, the name(s) of the above copyright --</I>
38 <I>-- holders shall not be used in advertising or otherwise to promote the --</I>
39 <I>-- sale, use or other dealings in this Software without prior written --</I>
40 <I>-- authorization. --</I>
41 <I>------------------------------------------------------------------------------</I>
42 <I>-- <A HREF="http://home.t-online.de/home/Juergen.Pfeifer">Jürgen Pfeifer</A>, Email: <A HREF="mailto:Juergen.Pfeifer@T-Online.de">Juergen.Pfeifer@T-Online.de</A> --</I>
43 <I>-- Version Control:</I>
44 <I>-- @Revision: 1.6 @</I>
45 <I>------------------------------------------------------------------------------</I>
47 <B>with</B> System.Parameters;
48 <B>with</B> Ada.Text_IO;
49 <B>with</B> Ada.IO_Exceptions;
51 <B>package</B> Terminal_Interface.Curses.Text_IO <B>is</B>
53 <B>use</B> type Ada.Text_IO.Count;
54 <B>subtype</B> Count <B>is</B> Ada.Text_IO.Count;
55 <B>subtype</B> Positive_Count <B>is</B> Count <B>range</B> 1 .. Count'Last;
57 <B>subtype</B> Field <B>is</B> Integer <B>range</B> 0 .. System.Parameters.Field_Max;
58 <B>subtype</B> Number_Base <B>is</B> Integer <B>range</B> 2 .. 16;
60 type Type_Set <B>is</B> (Lower_Case, Upper_Case, Mixed_Case);
62 <I>-- For most of the routines you will see a version without a Window</I>
63 <I>-- type parameter. They will operate on a default window, which can</I>
64 <I>-- be set by the user. It is initially equal to Standard_Window.</I>
66 <B>procedure</B> Set_Window (Win : <B>in</B> Window);
67 <I>-- Set Win as the default window</I>
69 <B>function</B> Get_Window <B>return</B> Window;
70 <I>-- Get the current default window</I>
72 <B>procedure</B> Flush (Win : <B>in</B> Window);
73 <B>procedure</B> Flush;
75 <I>--------------------------------------------</I>
76 <I>-- Specification of line and page lengths --</I>
77 <I>--------------------------------------------</I>
79 <I>-- There are no set routines in this package. I assume, that you allocate</I>
80 <I>-- the window with an appropriate size.</I>
81 <I>-- A scroll-window is interpreted as an page with unbounded page length,</I>
82 <I>-- i.e. it returns the conventional 0 as page length.</I>
84 <B>function</B> Line_Length (Win : <B>in</B> Window) <B>return</B> Count;
85 <B>function</B> Line_Length <B>return</B> Count;
87 <B>function</B> Page_Length (Win : <B>in</B> Window) <B>return</B> Count;
88 <B>function</B> Page_Length <B>return</B> Count;
90 <I>------------------------------------</I>
91 <I>-- Column, Line, and Page Control --</I>
92 <I>------------------------------------</I>
93 <B>procedure</B> New_Line (Win : <B>in</B> Window; Spacing : <B>in</B> Positive_Count := 1);
94 <B>procedure</B> New_Line (Spacing : <B>in</B> Positive_Count := 1);
96 <B>procedure</B> New_Page (Win : <B>in</B> Window);
97 <B>procedure</B> New_Page;
99 <B>procedure</B> Set_Col (Win : <B>in</B> Window; To : <B>in</B> Positive_Count);
100 <B>procedure</B> Set_Col (To : <B>in</B> Positive_Count);
102 <B>procedure</B> Set_Line (Win : <B>in</B> Window; To : <B>in</B> Positive_Count);
103 <B>procedure</B> Set_Line (To : <B>in</B> Positive_Count);
105 <B>function</B> Col (Win : <B>in</B> Window) <B>return</B> Positive_Count;
106 <B>function</B> Col <B>return</B> Positive_Count;
108 <B>function</B> Line (Win : <B>in</B> Window) <B>return</B> Positive_Count;
109 <B>function</B> Line <B>return</B> Positive_Count;
111 <I>-----------------------</I>
112 <I>-- Characters-Output --</I>
113 <I>-----------------------</I>
115 <B>procedure</B> Put (Win : <B>in</B> Window; Item : <B>in</B> Character);
116 <B>procedure</B> Put (Item : <B>in</B> Character);
118 <I>--------------------</I>
119 <I>-- Strings-Output --</I>
120 <I>--------------------</I>
122 <B>procedure</B> Put (Win : <B>in</B> Window; Item : <B>in</B> String);
123 <B>procedure</B> Put (Item : <B>in</B> String);
125 <B>procedure</B> Put_Line
126 (Win : <B>in</B> Window;
127 Item : <B>in</B> String);
129 <B>procedure</B> Put_Line
130 (Item : <B>in</B> String);
134 Status_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Status_Error;
135 Mode_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Mode_Error;
136 Name_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Name_Error;
137 Use_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Use_Error;
138 Device_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Device_Error;
139 End_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.End_Error;
140 Data_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Data_Error;
141 Layout_Error : <B>exception</B> <B>renames</B> Ada.IO_Exceptions.Layout_Error;
143 <B>end</B> Terminal_Interface.Curses.Text_IO;
149 This is BETA software. The interface is subject to change without notice.<P>
150 <!-- Do NOT delete my name or the tool name from below; -->
151 <!-- giving me credit is a condition of use of ada2html -->
152 <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>