1 ------------------------------------------------------------------------------
3 -- GNAT ncurses Binding Samples --
5 -- Sample.Form_Demo.Aux --
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; use Terminal_Interface.Curses;
28 with Terminal_Interface.Curses.Panels; use Terminal_Interface.Curses.Panels;
29 with Terminal_Interface.Curses.Forms; use Terminal_Interface.Curses.Forms;
31 package Sample.Form_Demo.Aux is
33 procedure Geometry (F : in Form;
36 Y : out Line_Position;
37 X : out Column_Position);
38 -- Calculate the geometry for a panel beeing able to be used to display
41 function Create (F : Form;
44 Col : Column_Position) return Panel;
45 -- Create a panel decorated with a frame and the title at the specified
46 -- position. The dimension of the panel is derived from the menus layout.
48 procedure Destroy (F : in Form;
50 -- Destroy all the windowing structures associated with this menu and
53 function Get_Request (F : Form;
55 Handle_CRLF : Boolean := True) return Key_Code;
56 -- Centralized request driver for all menus in this sample. This
57 -- gives us a common key binding for all menus.
59 function Make (Top : Line_Position;
60 Left : Column_Position;
61 Text : String) return Field;
64 function Make (Height : Line_Count := 1;
67 Left : Column_Position;
68 Off_Screen : Natural := 0) return Field;
69 -- create a editable field
71 function Default_Driver (F : Form;
73 P : Panel) return Boolean;
75 function Count_Active (F : Form) return Natural;
76 -- Count the number of active fields in the form
78 end Sample.Form_Demo.Aux;