DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ B T ┃
Length: 6034 (0x1792) Types: TextFile Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11 └─ ⟦129cab021⟧ »DATA« └─⟦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;