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: ┃ T V

⟦babe2242c⟧ TextFile

    Length: 4531 (0x11b3)
    Types: TextFile
    Names: »V«

Derivation

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

TextFile

with Xlbt_Arithmetic;
with Xlbt_Basic;
with Xlbt_Font;
with Object;

use Xlbt_Arithmetic;

package Easy_Y is
    type Events is (Update, Button_Up, Button_Down);
    type Fonts is (Small_Font, Medium_Font, Large_Font);

    subtype Coordinate is S_Short;
    subtype Dimension is U_Short_Positive;

    type Window_Type is private;


    function Get_Main_Window return Xlbt_Basic.X_Window;
    procedure Put_Main_Window (Main_Window : in Xlbt_Basic.X_Window);

    function Get_Root_Window return Xlbt_Basic.X_Window;
    procedure Put_Root_Window (Root_Window : in Xlbt_Basic.X_Window);

    function Get_Title (Window : in Window_Type) return Object.Tiny_String;
    procedure Put_Title (Window : in out Window_Type;
                         Title : Object.Tiny_String);

    function Get_X (Window : in Window_Type) return Object.Index;
    procedure Put_X (Window : in out Window_Type; X : Object.Index);

    function Get_Y (Window : in Window_Type) return Object.Index;
    procedure Put_Y (Window : in out Window_Type; Y : Object.Index);

    function Get_Size (Window : in Window_Type) return Object.Index;
    procedure Put_Size (Window : in out Window_Type; Size : Object.Index);

    procedure Put_Size (Size : Object.Index);
    function Get_Font return Xlbt_Font.X_Font_Struct;
    procedure Put_Font (To : Fonts);

    function Get_Left (Window : in Window_Type) return Object.Index;
    procedure Put_Left (Window : in out Window_Type; Left : Object.Index);

    function Get_Right (Window : in Window_Type) return Object.Index;
    procedure Put_Right (Window : in out Window_Type; Right : Object.Index);

    function Get_Width (Window : in Window_Type) return Object.Index;
    procedure Put_Width (Window : in out Window_Type; Width : Object.Index);

    function Get_Height (Window : in Window_Type) return Object.Index;
    procedure Put_Height (Window : in out Window_Type; Height : Object.Index);

    procedure Set_Display (Window : in Window_Type);
    function Get_Display (Window : in Window_Type) return Xlbt_Basic.X_Display;
    procedure Put_Display (Window : in out Window_Type;
                           Display : Xlbt_Basic.X_Display);

    function Get_Current_Window return Window_Type;

    function Get_Screen return Xlbt_Basic.X_Screen_Number;
    procedure Put_Screen (Screen : Xlbt_Basic.X_Screen_Number);

    function Get_Graphic_Context return Xlbt_Basic.X_Gc;
    procedure Put_Graphic_Context (Graphic_Context : Xlbt_Basic.X_Gc);


    function Get_X_Mouse return Object.Index;
    procedure Put_X_Mouse (X : Object.Index);

    function Get_Y_Mouse return Object.Index;
    procedure Put_Y_Mouse (Y : Object.Index);


    procedure Open (Display : String; Window : in out Window_Type);
    procedure Move_To (X, Y : Coordinate);
    procedure Line_To (X, Y : Coordinate);
    procedure Line (X1, Y1, X2, Y2 : Object.Index);
    procedure Draw_String (The_String : String);
    function Next_Event return Events;
    procedure Print (X1, Y1 : Object.Index; The_String : Object.Tiny_String);
    procedure Close (Window : in out Window_Type);

    procedure Update;
    package Arithmetic is
        function "+" (C : Coordinate; D : Dimension) return Coordinate;
        function "-" (C : Coordinate; D : Dimension) return Coordinate;
        function "/" (D : Dimension; Scale : Positive) return Dimension;
        function "*" (D : Dimension; Scale : Positive) return Dimension;
        function "+" (D1, D2 : Dimension) return Dimension
            renames Xlbt_Arithmetic."+";
        function "-" (D1, D2 : Dimension) return Dimension
            renames Xlbt_Arithmetic."-";
    end Arithmetic;

    Fatal_Error, Value_Error : exception;

private
    type Window_Type is
        record
            Window_Descriptor : Xlbt_Basic.X_Window;
            Root_Window_Descriptor : Xlbt_Basic.X_Window;
            Display_Descriptor : Xlbt_Basic.X_Display;
            Screen_Descriptor : Xlbt_Basic.X_Screen_Number;
            Graphic_Context : Xlbt_Basic.X_Gc;
            Title : Object.Tiny_String;
            Left : Coordinate := 100;
            Right : Coordinate := 100;
            Width : Dimension := 500;
            Height : Dimension := 500;
            X_Pen : Object.Index := 1;
            Y_Pen : Object.Index := 1;
            Size_Pen : Object.Index := 1;
            Font_Pen : Xlbt_Font.X_Font_Struct;
            X_Mouse : Object.Index := 1;
            Y_Mouse : Object.Index := 1;
            Block : Object.Index := 1;
        end record;  
end Easy_Y;