-- hello2.adb
--    Purpose: Show how to use curses functions with a loop.
--    Outline: Initialize, draw stuff, wrap up.

with
  Terminal_Interface.Curses;

use
  Terminal_Interface.Curses;

procedure Hello is
   Key : Real_Key_Code;
begin
   Init_Screen;
   Clear;
   for Line in 0 .. Lines -1 loop
      Move_Cursor (Line => Line, Column => 2 * Column_Position (Line));
      if Line mod 2 = 1 then
         Standout (On => True);
      end if;
      Add (Str => "Hello, world");
      if Line mod 2 = 1 then
         Standout (On => False);
      end if;
   end loop;
   Refresh;
   Key := Get_Keystroke;
   End_Screen;
exception
   when others =>
      End_Screen;
end Hello;

