1 ------------------------------------------------------------------------------
3 -- GNAT ncurses Binding Samples --
5 -- Sample.My_Field_Type --
11 -- The ncurses Ada95 binding is copyrighted 1996 by --
12 -- Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de --
14 -- Permission is hereby granted to reproduce and distribute this --
15 -- binding by any means and for any fee, whether alone or as part --
16 -- of a larger distribution, in source or in binary form, PROVIDED --
17 -- this notice is included with any such distribution, and is not --
18 -- removed from any of its header files. Mention of ncurses and the --
19 -- author of this binding in any applications linked with it is --
20 -- highly appreciated. --
22 -- This binding comes AS IS with no warranty, implied or expressed. --
23 ------------------------------------------------------------------------------
26 ------------------------------------------------------------------------------
27 with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
29 -- This is a very simple user defined field type. It accepts only a
30 -- defined character as input into the field.
32 package body Sample.My_Field_Type is
34 -- That's simple. There are no field validity checks.
35 function F_Check (Fld : Field; Info : My_Access) return Boolean
41 -- Check exactly against the specified character.
42 function C_Check (Ch : Character; Info : My_Access) return Boolean
44 C : constant Character := Info.Ch;
49 end Sample.My_Field_Type;