|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Box_Display, seg_0046ea
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Window_Io;
with Bounded_String;
package body Box_Display is
Graphics_Set : constant Window_Io.Font :=
Window_Io.Font'(Window_Io.Graphics, Window_Io.Vanilla);
function Make (Height : Natural;
Width : Natural;
Label : String) return Box is
Return_Box : Box;
begin
Return_Box.Height := Height;
Return_Box.Width := Width;
Bounded_String.Copy (Return_Box.Label, Label);
return Return_Box;
end Make;
function Height (A_Box : Box) return Natural is
begin
return A_Box.Height;
end Height;
function Width (A_Box : Box) return Natural is
begin
return A_Box.Width;
end Width;
function Label (On_Box : Box) return String is
begin
return Bounded_String.Image (On_Box.Label);
end Label;
procedure Display (The_Box : Box;
In_Window : Window_Io.File_Type
At_Line : Window_Io.Line_Number;
At_Column : Window_Io.Column_Number) is
begin
Window_Io.Position_Cursor (In_Window, At_Line, At_Column);
Window_Io.Overwrite (In_Window, "l", Graphics_Set);
for I in 1 .. The_Box.Width loop
Window_Io.Overwrite (In_Window, "q", Graphics_Set);
end loop;
Window_Io.Overwrite (In_Window, "k", Graphics_Set);
Window_Io.Position_Cursor (In_Window, At_Line + 1, At_Column);
for I in 1 .. The_Box.Height loop
Window_Io.Overwrite (In_Window, "x", Graphics_Set);
Window_Io.Move_Cursor (In_Window, 1, -1);
end loop;
Window_Io.Position_Cursor (In_Window, At_Line + 1,
At_Column + The_Box.Width + 1);
for I in 1 .. The_Box.Height loop
Window_Io.Overwrite (In_Window, "x", Graphics_Set);
Window_Io.Move_Cursor (In_Window, 1, -1);
end loop;
Window_Io.Position_Cursor
(In_Window, At_Line + The_Box.Height + 1, At_Column);
Window_Io.Overwrite (In_Window, "m", Graphics_Set);
for I in 1 .. The_Box.Width loop
Window_Io.Overwrite (In_Window, "q", Graphics_Set);
end loop;
Window_Io.Overwrite (In_Window, "j", Graphics_Set);
Window_Io.Position_Cursor (In_Window, At_Line + 1, At_Column + 1);
Window_Io.Overwrite
(In_Window, Bounded_String.Image (The_Box.Label), Window_Io.Normal);
for I in 1 .. The_Box.Width - Bounded_String.Length (The_Box.Label) loop
Window_Io.Overwrite (In_Window, ' ', Window_Io.Normal);
end loop;
end Display;
end Box_Display;
nblk1=4
nid=0
hdr6=8
[0x00] rec0=24 rec1=00 rec2=01 rec3=06c
[0x01] rec0=00 rec1=00 rec2=04 rec3=002
[0x02] rec0=19 rec1=00 rec2=02 rec3=052
[0x03] rec0=16 rec1=00 rec2=03 rec3=001
tail 0x217002a58815c6756d286 0x42a00088462061e03