|
|
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: 11264 (0x2c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Requester_Old, seg_03700f
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Bounded_String;
package body Requester_Old is
procedure Rectangle (X, Y : Object.Index; Title : Object.Tiny_String) is
use Object;
Long : Object.Index :=
30 + 8 * Object.Index (Bounded_String.Length (Title));
begin
Easy_Y.Put_Font (To => Easy_Y.Small_Font);
Easy_Y.Put_Size (Window => Window_Requester, Size => 1);
Easy_Y.Line (X, Y, X + Long, Y);
Easy_Y.Line (X + Long, Y, X + Long, Y + 40);
Easy_Y.Line (X + Long, Y + 40, X, Y + 40);
Easy_Y.Line (X, Y + 40, X, Y);
Easy_Y.Line (X + 5, Y + 5, X + Long - 5, Y + 5);
Easy_Y.Line (X + Long - 5, Y + 5, X + Long - 5, Y + 35);
Easy_Y.Line (X + Long - 5, Y + 35, X + 5, Y + 35);
Easy_Y.Line (X + 5, Y + 35, X + 5, Y + 5);
Easy_Y.Print (X1 => X + 15, Y1 => Y + 25, The_String => Title);
end Rectangle;
procedure Push (X, Y : Object.Index; Title : Object.Tiny_String) is
use Object;
Long : Object.Index :=
30 + 8 * Object.Index (Bounded_String.Length (Title));
begin
Easy_Y.Put_Font (To => Easy_Y.Small_Font);
Easy_Y.Put_Size (Window => Window_Requester, Size => 1);
Easy_Y.Line (X, Y + 1, X + Long, Y + 1);
Easy_Y.Line (X + Long - 1, Y, X + Long - 1, Y + 40);
Easy_Y.Line (X + Long, Y + 39, X, Y + 39);
Easy_Y.Line (X + 1, Y + 40, X + 1, Y);
Easy_Y.Line (X + 5, Y + 5, X, Y);
Easy_Y.Line (X + Long - 5, Y + 5, X + Long, Y);
Easy_Y.Line (X + Long - 5, Y + 35, X + Long, Y + 40);
Easy_Y.Line (X + 5, Y + 35, X, Y + 40);
Easy_Y.Print (X1 => X + 16, Y1 => Y + 26, The_String => Title);
delay (1.0);
end Push;
function In_Area (X, Y : Object.Index; Title : Object.Tiny_String)
return Boolean is
use Object;
Long : Object.Index :=
30 + 8 * Object.Index (Bounded_String.Length (Title));
begin
if X <= Easy_Y.Get_X_Mouse and then
Easy_Y.Get_X_Mouse <= X + Long and then
Y <= Easy_Y.Get_Y_Mouse and then
Easy_Y.Get_Y_Mouse <= Y + 40 then
return True;
else
return False;
end if;
end In_Area;
function Choice (X, Y : Object.Index;
Screen : String;
The_Message : Message.Unary;
Str : Object.Tiny_String) return Object.Index is
use Object;
Dx : Object.Index := 0;
Long : Object.Index := 0;
Position : Object.Index := 0;
Mess : Message.Unary := The_Message;
begin
Easy_Y.Put_Title (Window => Window_Requester, Title => Str);
Easy_Y.Put_Left (Window => Window_Requester, Left => X);
Easy_Y.Put_Right (Window => Window_Requester, Right => Y);
Message.Init (Mess);
while not Message.Is_Done (Mess) loop
Long := Long + 50 +
8 * Object.Index (Bounded_String.Length
(Message.Get (Name_From => Mess)));
Number_Button := Number_Button + 1;
Message.Next (Mess);
end loop;
if Number_Button /= 0 and then
Long < 100 + 10 * Object.Index (Bounded_String.Length (Str)) then
declare
use Object;
Long_Old : Object.Index := Long;
begin
Long := 100 + 10 * Object.Index (Bounded_String.Length (Str));
Dx := (Long - Long_Old) / Number_Button;
end;
end if;
Easy_Y.Put_Width (Window => Window_Requester, Width => Long);
Easy_Y.Put_Height (Window => Window_Requester, Height => 100);
Easy_Y.Open (Display => Screen, Window => Window_Requester);
Easy_Y.Put_Font (To => Easy_Y.Small_Font);
Easy_Y.Put_Size (Window => Window_Requester, Size => 1);
loop
case Easy_Y.Next_Event is
when Easy_Y.Update =>
Message.Init (Mess);
Position := Dx / 2;
for I in 1 .. Number_Button loop
Rectangle (X => 10 + Position,
Y => 35,
Title => Message.Get (Name_From => Mess));
Position := Position + Dx + 50 +
8 * Object.Index
(Bounded_String.Length
(Message.Get
(Name_From => Mess)));
Message.Next (Mess);
end loop;
when Easy_Y.Button_Down =>
Message.Init (Mess);
Position := Dx / 2;
for I in 1 .. Number_Button loop
if In_Area
(X => 10 + Position,
Y => 35,
Title => Message.Get (Name_From => Mess)) then
Push (X => 10 + Position,
Y => 35,
Title => Message.Get (Name_From => Mess));
return I;
end if;
Position := Position + Dx + 50 +
8 * Object.Index
(Bounded_String.Length
(Message.Get
(Name_From => Mess)));
Message.Next (Mess);
end loop;
when Easy_Y.Button_Up =>
null;
when others =>
null;
end case;
end loop;
end Choice;
procedure Close is
begin
Easy_Y.Close (Window => Window_Requester);
end Close;
end Requester_Old;
nblk1=a
nid=2
hdr6=10
[0x00] rec0=1c rec1=00 rec2=01 rec3=008
[0x01] rec0=1a rec1=00 rec2=0a rec3=04a
[0x02] rec0=1c rec1=00 rec2=06 rec3=032
[0x03] rec0=01 rec1=00 rec2=09 rec3=01a
[0x04] rec0=15 rec1=00 rec2=04 rec3=068
[0x05] rec0=13 rec1=00 rec2=05 rec3=03e
[0x06] rec0=13 rec1=00 rec2=03 rec3=024
[0x07] rec0=11 rec1=00 rec2=07 rec3=000
[0x08] rec0=14 rec1=00 rec2=05 rec3=001
[0x09] rec0=f9 rec1=09 rec2=bc rec3=4d4
tail 0x217343b1e84e179cdc6e8 0x42a00088462060003
Free Block Chain:
0x2: 0000 00 08 00 2d 80 2a 20 20 20 20 20 20 38 20 2a 20 ┆ - * 8 * ┆
0x8: 0000 00 00 01 4e 80 26 20 20 20 20 20 20 20 20 20 20 ┆ N & ┆