DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦50d98ee96⟧ TextFile

    Length: 2754 (0xac2)
    Types: TextFile
    Names: »B«

Derivation

└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 

TextFile

-- with Class_Integer;
-- with Class_Boolean;
-- with Class_String;
-- with Class_Block;
-- with class_pen;
-- with class_turtle;
-- with Class_Window;
with Message;
with Requester;
with Bounded_String;
with Easy_Y;
with Object;

package body Class_Error is

    type Flag is (Off, On);

    Tab_Flag : Flag := On;

    procedure Open (X, Y : Object.Index; Screen : String) is
        use Object;
    begin
        Easy_Y.Put_Title (Window => Error_Window,
                          Title => Bounded_String.Value ("Error", 80));
        Easy_Y.Put_Left (Window => Error_Window, Left => X);
        Easy_Y.Put_Right (Window => Error_Window, Right => Y);
        Easy_Y.Put_Width (Window => Error_Window, Width => The_Width);
        Easy_Y.Put_Height (Window => Error_Window, Height => The_Height);
        Easy_Y.Open (Display => Screen, Window => Error_Window);

        Easy_Y.Put_Font (To => Easy_Y.Small_Font);
        Easy_Y.Put_Size (Window => Error_Window, Size => 1);

        Easy_Y.Update;

        Column := 0;
        Line_Number := 1;
        Line_Max := The_Height / 16;
    end Open;


    procedure Close is
    begin
        Easy_Y.Close (Window => Error_Window);
    end Close;


    procedure New_Line (Number : Object.Index := 1) is
        use Object;
        Blanck : String (1 .. 80) := (1 .. 80 => ' ');
        Button : Message.Unary;
        Result : Object.Index;
    begin
        Column := 0;
        Line_Number := Line_Number + Number;
        if Line_Number >= Line_Max then
            Line_Number := 1;

            Message.Put (This_Name => Bounded_String.Value ("Suite", 80),
                         Into => Button);
            Requester.Open (100, 850, "agave", Button,
                            Bounded_String.Value ("Cliquez pour la suite", 80));
            Result := Requester.Choice (Button);
            Message.Free (Button);

            for I in 0 .. Line_Max * 2 loop
                Easy_Y.Set_Display (Window => Error_Window);
                Easy_Y.Print (1, I * 10, Bounded_String.Value (Blanck, 80));
            end loop;
        end if;
        Tab_Flag := On;
    end New_Line;


    procedure Put (The_String : String) is
        use Object;
    begin
        Easy_Y.Set_Display (Window => Error_Window);
        Easy_Y.Print (Column * 8, Line_Number * 16,
                      Bounded_String.Value (The_String, 80));
        Column := Column + Object.Index (The_String'Length);
    end Put;


    procedure Put_Line (The_String : String) is
        use Object;  
    begin  
        Easy_Y.Set_Display (Window => Error_Window);
        Easy_Y.Print (Column, Line_Number * 16,
                      Bounded_String.Value (The_String, 80));
        New_Line;
    end Put_Line;

end Class_Error;