1 ------------------------------------------------------------------------------
3 -- GNAT ncurses Binding Samples --
5 -- Sample.Menu_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.Menus; use Terminal_Interface.Curses.Menus;
31 package Sample.Menu_Demo.Aux is
33 procedure Geometry (M : in Menu;
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 (M : Menu;
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 (M : in Menu;
50 -- Destroy all the windowing structures associated with this menu and
53 function Get_Request (M : Menu; P : Panel) return Key_Code;
54 -- Centralized request driver for all menus in this sample. This
55 -- gives us a common key binding for all menus.
57 end Sample.Menu_Demo.Aux;