DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦03fdc87bb⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, generic, package Multiple_Selection_Object_Editor_Menu, seg_00467e

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



--| @SUMMARY defines an abstraction for menus with multiple selections.
--| @DESCRIPTION This package also allows clients to define actions that
--| occur when keys are pressed.  An Up_Arrow or Down_Arrow key moves the
--| cursor from element to element in the menu.  A Left_Arrow key selects
--| (and highlights) an item in the menu.  A Right_Arrow key un-highlights
--| a menu item.  When an applicative key is pressed, the apply procedure is
--| called for each selected menu element. When an executable key is pressed,
--| the execute actual is called.  Other keys are defined as follows:
--| '.' removes all selections.  The Quit key exits the menu.
--|
--| @INDICES (Window_Io, Menus, Object_Editor)
--|
with Window_Io;
with Set_Generic;
with New_Keys;
generic
    type Element is private;

    --| @DESCRIPTION Defines the image displayed in the menu for an element
    --| placed in the menu definition.
    with function Line_Image (E : Element) return String;

    --| @DESCRIPTION Defines the key that exits the menu
    Quit_Key : New_Keys.Key_Type := New_Keys.Enter;

    --| @DESCRIPTION Defines the set of keys that are "active", having
    --| corresponding actions defined with the actual parameter to the
    --| Apply formal below.  One application might be to display another
    --| nested menu.
    with function  Is_Applicative_Key
                     (Command : New_Keys.Key_Type) return Boolean;
    with procedure Apply (Command : New_Keys.Key_Type; E : in out Element);

    --| @DESCRIPTION Also defines a set of keys that are "active", providing
    --| actions that are independent of any menu element.
    with function  Is_Executable_Key
                     (Command : New_Keys.Key_Type) return Boolean;
    with procedure Execute (Command   :     New_Keys.Key_Type;
                            Redisplay : out Boolean);

package Multiple_Selection_Object_Editor_Menu is

    subtype Menu_Window is Window_Io.File_Type;

    type Menu_Definition is private;

    function Make return Menu_Definition;

    procedure Add (E : Element; To : in out Menu_Definition);

    --| @DESCRIPTION Displays the menu and begins to accept user pressed
    --| keys as defined above.
    --| @Raises (Redisplay_Required)
    procedure Create (Menu       : Menu_Window;
                      Font       : Window_Io.Font := Window_Io.Normal;
                      Definition : Menu_Definition);

    --| @DESCRIPTION raise is a call to Execute designates the the current
    --| menu must be redisplayed to maintain integrity.
    Redisplay_Required : exception;

private
    type Menu_Node;
    type Menu_Definition is access Menu_Node;

    type Menu_Node is
        record
            Elem        : Element;
            Line_Number : Positive;
            Next        : Menu_Definition;
            Previous    : Menu_Definition;
        end record;

end Multiple_Selection_Object_Editor_Menu;


E3 Meta Data

    nblk1=5
    nid=0
    hdr6=a
        [0x00] rec0=17 rec1=00 rec2=01 rec3=000
        [0x01] rec0=15 rec1=00 rec2=02 rec3=054
        [0x02] rec0=00 rec1=00 rec2=05 rec3=004
        [0x03] rec0=1f rec1=00 rec2=03 rec3=044
        [0x04] rec0=02 rec1=00 rec2=04 rec3=000
    tail 0x217002952815c6681238b 0x42a00088462061e03