]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/samples/sample-explanation.ads
ncurses 4.1
[ncurses.git] / Ada95 / samples / sample-explanation.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                       GNAT ncurses Binding Samples                       --
4 --                                                                          --
5 --                           Sample.Explanation                             --
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 --  Poor mans help system. This scans a sequential file for key lines and
28 --  then reads the lines up to the next key. Those lines are presented in
29 --  a window as help or explanation.
30 --
31 with Terminal_Interface.Curses;
32
33 package Sample.Explanation is
34
35    package Curses renames Terminal_Interface.Curses;
36
37    procedure Explain (Key : in String);
38    --  Retrieve the text associated with this key and display it.
39
40    procedure Explain_Context;
41    --  Explain the current context.
42
43    procedure Notepad (Key : in String);
44    --  Put a note on the screen and maintain it with the context
45
46    Explanation_Not_Found : exception;
47    Explanation_Error     : exception;
48
49 end Sample.Explanation;