]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/samples/sample-menu_demo-aux.ads
ncurses 4.1
[ncurses.git] / Ada95 / samples / sample-menu_demo-aux.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                       GNAT ncurses Binding Samples                       --
4 --                                                                          --
5 --                            Sample.Menu_Demo.Aux                          --
6 --                                                                          --
7 --                                 S P E C                                  --
8 --                                                                          --
9 --  Version 00.92                                                           --
10 --                                                                          --
11 --  The ncurses Ada95 binding is copyrighted 1996 by                        --
12 --  Juergen Pfeifer, Email: Juergen.Pfeifer@T-Online.de                     --
13 --                                                                          --
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.                                                     --
21 --                                                                          --
22 --  This binding comes AS IS with no warranty, implied or expressed.        --
23 ------------------------------------------------------------------------------
24 --  Version Control
25 --  $Revision: 1.2 $
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;
30
31 package Sample.Menu_Demo.Aux is
32
33    procedure Geometry (M  : in  Menu;
34                        L  : out Line_Count;
35                        C  : out Column_Count;
36                        Y  : out Line_Position;
37                        X  : out Column_Position);
38    --  Calculate the geometry for a panel beeing able to be used to display
39    --  the menu.
40
41    function Create (M     : Menu;
42                     Title : String;
43                     Lin   : Line_Position;
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.
47
48    procedure Destroy (M : in Menu;
49                       P : in out Panel);
50    --  Destroy all the windowing structures associated with this menu and
51    --  panel.
52
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.
56
57 end Sample.Menu_Demo.Aux;