1 ------------------------------------------------------------------------------
3 -- GNAT ncurses Binding Samples --
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;
29 with Sample.Explanation; use Sample.Explanation;
31 -- This package contains some conveniant helper routines used throughout
34 package body Sample.Helpers is
36 procedure Window_Title (Win : in Window;
41 Pos : Column_Position := 0;
43 Get_Size (Win, Height, Width);
44 if Title'Length < Width then
45 Pos := (Width - Title'Length) / 2;
47 Add (Win, 0, Pos, Title);
50 procedure Not_Implemented is