with Window_Io;
with Bounded_String;
package Window_Utilities is

    procedure Beginning_Of_Line (Window : Window_Io.File_Type);

    procedure End_Of_Line (Window : Window_Io.File_Type);

    procedure Next_Line (Window : Window_Io.File_Type);

    procedure Home (Window : Window_Io.File_Type);

    procedure Erase (Window : Window_Io.File_Type);

    procedure Erase_Column (Window : Window_Io.File_Type;
                            Offset : Natural;
                            Width : Positive;
                            Length : Natural := 0);

    function Query (Input_Window : Window_Io.File_Type;
                    Output_Window : Window_Io.File_Type;
                    Prompt : String;
                    Line : Positive;
                    Column : Positive) return String;

    function Prompt_Query (Input_Window : Window_Io.File_Type;
                           Output_Window : Window_Io.File_Type;
                           Prompt : String;
                           Line : Positive;
                           Column : Positive) return String;
    function Quiet_Query (Input_Window : Window_Io.File_Type;
                          Output_Window : Window_Io.File_Type;
                          Prompt : String;
                          Line : Positive;
                          Column : Positive) return String;


    procedure Continue (Input_Window : Window_Io.File_Type;
                        Output_Window : Window_Io.File_Type;
                        Prompt : String;
                        Line : Positive;
                        Column : Positive);


    type Iterator is private;

    function Initialize (Window : Window_Io.File_Type) return Iterator;

    function Done (Iter : Iterator) return Boolean;

    function Value (Iter : Iterator) return String;

    procedure Next (Iter : in out Iterator);
private
    Line_Length : constant := 256;
    subtype Bound_String is Bounded_String.Variable_String (Line_Length);

    type Node;
    type Iterator is access Node;

    type Node is
        record
            Line : Bound_String;
            Next : Iterator;
        end record;
end Window_Utilities;