]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/html/terminal_interface-curses-forms-field_types-user_s.html
ncurses 4.2
[ncurses.git] / Ada95 / html / terminal_interface-curses-forms-field_types-user_s.html
diff --git a/Ada95/html/terminal_interface-curses-forms-field_types-user_s.html b/Ada95/html/terminal_interface-curses-forms-field_types-user_s.html
new file mode 100644 (file)
index 0000000..df4346e
--- /dev/null
@@ -0,0 +1,110 @@
+<HTML>
+<HEAD>
+<TITLE></TITLE>
+</HEAD>
+<BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
+<PRE>
+<I>------------------------------------------------------------------------------</I>
+<I>--                                                                          --</I>
+<I>--                           <A HREF="http://www.gnat.com">GNAT</A> ncurses Binding                           --</I>
+<I>--                                                                          --</I>
+<I>--               Terminal_Interface.Curses.Forms.Field_Types.User           --</I>
+<I>--                                                                          --</I>
+<I>--                                 S P E C                                  --</I>
+<I>--                                                                          --</I>
+<I>------------------------------------------------------------------------------</I>
+<I>-- Copyright (c) 1998 Free Software Foundation, Inc.                        --</I>
+<I>--                                                                          --</I>
+<I>-- Permission is hereby granted, free of charge, to any person obtaining a  --</I>
+<I>-- copy of this software and associated documentation files (the            --</I>
+<I>-- "Software"), to deal in the Software without restriction, including      --</I>
+<I>-- without limitation the rights to use, copy, modify, merge, publish,      --</I>
+<I>-- distribute, distribute with modifications, sublicense, and/or sell       --</I>
+<I>-- copies of the Software, and to permit persons to whom the Software is    --</I>
+<I>-- furnished to do so, subject to the following conditions:                 --</I>
+<I>--                                                                          --</I>
+<I>-- The above copyright notice and this permission notice shall be included  --</I>
+<I>-- in all copies or substantial portions of the Software.                   --</I>
+<I>--                                                                          --</I>
+<I>-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  --</I>
+<I>-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               --</I>
+<I>-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   --</I>
+<I>-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   --</I>
+<I>-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    --</I>
+<I>-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    --</I>
+<I>-- THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               --</I>
+<I>--                                                                          --</I>
+<I>-- Except as contained in this notice, the name(s) of the above copyright   --</I>
+<I>-- holders shall not be used in advertising or otherwise to promote the     --</I>
+<I>-- sale, use or other dealings in this Software without prior written       --</I>
+<I>-- authorization.                                                           --</I>
+<I>------------------------------------------------------------------------------</I>
+<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>
+<I>--  Version Control:</I>
+<I>--  @Revision: 1.1 @</I>
+<I>------------------------------------------------------------------------------</I>
+<B>with</B> Ada.Unchecked_Deallocation;
+<B>with</B> Terminal_Interface.Curses.<A HREF="terminal_interface-curses-aux_s.html#32:35">Aux</A>;
+
+<B>package</B> Terminal_Interface.Curses.Forms.Field_Types.User <B>is</B>
+
+   type User_Defined_Field_Type <B>is</B> <B>abstract</B> <B>new</B> Field_Type <B>with</B> <B>null</B> <B>record</B>;
+   <I>--  This is the root of the mechanism we use to create field types in</I>
+   <I>--  Ada95. You should your own type derive from this one and implement</I>
+   <I>--  the Field_Check and Character_Check functions for your own type.</I>
+
+   type User_Defined_Field_Type_Access <B>is</B> <B>access</B> <B>all</B>
+     User_Defined_Field_Type'Class;
+
+   <B>function</B> Field_Check
+     (Fld : Field;
+      Typ : User_Defined_Field_Type) <B>return</B> Boolean
+      <B>is</B> <B>abstract</B>;
+   <I>--  If True is returned, the field is considered valid, otherwise it is</I>
+   <I>--  invalid.</I>
+
+   <B>function</B> Character_Check
+     (Ch  : Character;
+      Typ : User_Defined_Field_Type) <B>return</B> Boolean
+      <B>is</B> <B>abstract</B>;
+   <I>--  If True is returned, the character is considered as valid for the</I>
+   <I>--  field, otherwise as invalid.</I>
+
+   <B>procedure</B> Set_Field_Type (Fld : <B>in</B> Field;
+                             Typ : <B>in</B> User_Defined_Field_Type);
+   <I>--  This should work for all types derived from User_Defined_Field_Type.</I>
+   <I>--  No need to reimplement it for your derived type.</I>
+
+   <I>--  +----------------------------------------------------------------------</I>
+   <I>--  | Private Part.</I>
+   <I>--  | Used by the Choice child package.</I>
+<B>private</B>
+   <B>use</B> type Interfaces.C.Int;
+
+   <B>function</B> Generic_Field_Check (Fld : Field;
+                                 Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+   <B>pragma</B> Convention (C, Generic_Field_Check);
+   <I>--  This is the generic Field_Check_Function for the low-level fieldtype</I>
+   <I>--  representing all the User_Defined_Field_Type derivates. It routes</I>
+   <I>--  the call to the Field_Check implementation for the type.</I>
+
+   <B>function</B> Generic_Char_Check (Ch  : <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+                                Usr : System.Address) <B>return</B> <A HREF="terminal_interface-curses-aux_s.html#36:12">C_Int</A>;
+   <B>pragma</B> Convention (C, Generic_Char_Check);
+   <I>--  This is the generic Char_Check_Function for the low-level fieldtype</I>
+   <I>--  representing all the User_Defined_Field_Type derivates. It routes</I>
+   <I>--  the call to the Character_Check implementation for the type.</I>
+
+<B>end</B> Terminal_Interface.Curses.Forms.Field_Types.User;
+
+</PRE>
+
+<P><HR><P>
+<P>
+This is BETA software. The interface is subject to change without notice.<P>
+<!-- Do NOT delete my name or the tool name from below; -->
+<!-- giving me credit is a condition of use of ada2html -->
+<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>
+</BODY>
+</HTML>
+