~ubuntu-branches/ubuntu/hoary/topal/hoary

« back to all changes in this revision

Viewing changes to char_menus.ads

  • Committer: Bazaar Package Importer
  • Author(s): Phil Brooke
  • Date: 2003-12-10 22:08:49 UTC
  • Revision ID: james.westby@ubuntu.com-20031210220849-azlxh0w8yfqn4tuh
Tags: upstream-0.7.13.3
ImportĀ upstreamĀ versionĀ 0.7.13.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- `Topal': GPG/Pine integration
 
2
--
 
3
-- Copyright (C) 2001,2  Phillip J. Brooke
 
4
--
 
5
--     This program is free software; you can redistribute it and/or modify
 
6
--     it under the terms of the GNU General Public License as published by
 
7
--     the Free Software Foundation; either version 2 of the License, or
 
8
--     (at your option) any later version.
 
9
--
 
10
--     This program is distributed in the hope that it will be useful,
 
11
--     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
--     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
--     GNU General Public License for more details.
 
14
--
 
15
--     You should have received a copy of the GNU General Public License
 
16
--     along with this program; if not, write to the Free Software
 
17
--     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
18
 
 
19
with Globals; use Globals;
 
20
 
 
21
generic
 
22
   type Index is (<>);
 
23
package Char_Menus is
 
24
 
 
25
   Arrays_Not_Matched : exception;
 
26
 
 
27
   type MA is array (Index range <>) of UBS;
 
28
 
 
29
   -- Give a Menu_Array where each item contains the valid characters for
 
30
   -- that option.  The appropriate number will be returned.  Char_Words
 
31
   -- gives the word to display when that character is accepted.
 
32
   generic
 
33
      Accept_Chars   : MA;
 
34
      Char_Words     : MA;
 
35
      Default_Prompt : String := "";
 
36
   function Menu (Prompt : in String := Default_Prompt) return Index;
 
37
 
 
38
end Char_Menus;
 
39
 
 
40
 
 
41