/* Include File für das krypt Programm,
   hier werden die Gadgets initialisiert. */

/* Strukturen für den Requester */

SHORT cords[] = {0, 0, 72, 0, 72, 14, 0, 14, 0, 0};

struct Border border = {-1, -1, 2, 0, JAM1, 5, &cords[0], NULL};

struct IntuiText
                 BodyText5={2, 0,
                            JAM1,
                            59, 65,
                            &MyFont,
                            (UBYTE *)"This is Public Domain stuff.",
                            NULL},

                 BodyText4={2, 0,
                            JAM1,
                            59, 50,
                            &MyFont,
                            (UBYTE *)"Program developed for Morgain.",
                            &BodyText5},

                 BodyText3={2, 0,
                            JAM1,
                            75, 30,
                            &MyFont,
                            (UBYTE *)"© 1988 by Arthur Rat Soft.",
                            &BodyText4},

                 BodyText2={2, 0,
                            JAM1,
                            152, 20,
                            &MyFont,
                            (UBYTE *)"V.2.0pd",
                            &BodyText3},

                 BodyText1={2, 0,
                            JAM1,
                            160, 10,
                            &MyFont,
                            (UBYTE *)"KRYPT",
                            &BodyText2};


struct IntuiText PosText = {3, 0,
                            JAM1,
                            15, 3,
                            &MyFont,
                            (UBYTE *)"Danke.",
                            NULL};

struct Gadget PosGadget = {NULL,
                           285, 80,
                           71, 13,
                           GADGHCOMP,
                           RELVERIFY|ENDGADGET,
                           BOOLGADGET|REQGADGET,
                           (APTR)&border,
                           NULL,
                           &PosText,
                           NULL, NULL, 0, NULL};

SHORT reqcords[] = {2, 2, 380, 2, 380, 98, 2, 98, 2, 2};

struct Border RBorder = {0, 0, 2, 0, JAM1, 5, (SHORT *)&reqcords, NULL};

struct Requester request = {NULL,
                            0, 0,
                            382, 102,
                            0, 0,
                            &PosGadget,
                            &RBorder,
                            &BodyText1,
                            NULL,
                            1};

/* Auswahlgadgets für die einzelnen Menüpunkte */

/*Entschlüsselungs Gadget */

SHORT EntVectors[]={0,0,109,0,109,11,0,11,0,1};

struct Border EntBorder={-3,-2,
                         1,0,JAM1,
                         5,
                         (SHORT *)EntVectors,
                         NULL};

struct IntuiText EntText={3,2,
                          JAM2,
                          0,0,
                          &MyFont,
                          (UBYTE *)"Entschlüsseln",
                          NULL};

struct Gadget EntGadget={NULL,
                         225,14,104,8,
                         GADGHCOMP,
                         RELVERIFY | GADGIMMEDIATE,
                         BOOLGADGET,
                         (APTR)&EntBorder,
                         NULL,
                         &EntText,
                         0,NULL,0,NULL};

/* Verschlüsselungs Gadget */

SHORT VerVectors[]={0,0,109,0,109,11,0,11,0,1};

struct Border VerBorder={-3,-2,
                         1,0,JAM1,
                         5,
                         (SHORT *)VerVectors,
                         NULL};

struct IntuiText VerText={3,2,
                          JAM2,
                          0,0,
                          &MyFont,
                          (UBYTE *)"Verschlüsseln",
                          NULL};

struct Gadget VerGadget={&EntGadget,
                         51,14,104,8,
                         GADGHCOMP,
                         RELVERIFY | GADGIMMEDIATE,
                         BOOLGADGET,
                         (APTR)&VerBorder,
                         NULL,
                         &VerText,
                         0,NULL,0,NULL};

/* Undo Buffer für die StringGadgets */

# define MAXSTRSIZE 300
UBYTE UndoBuffer[MAXSTRSIZE];

/* String Gadget Definitionen */

/* Border für Quell- und ZielfileGadget */

SHORT QZfileVectors[]={0,0,222,0,222,11,0,11,0,1};

struct Border QZBorder={-3,-2,
                        1,0,JAM1,
                        5,
                        (SHORT *)QZfileVectors,
                        NULL};

/* QuellfileGadget */

UBYTE QuellfileBuffer[MAXSTRSIZE];

struct StringInfo QuellfileInfo={QuellfileBuffer,
                                 UndoBuffer,
                                 0,
                                 MAXSTRSIZE,
                                 0,0,0,0,0,0,NULL,0,NULL};

struct IntuiText QuellfileText={3,0,
                                JAM1,
                                -85,0,
                                &MyFont,
                                (UBYTE *)"Quellfile:",
                                NULL};
          
struct Gadget QuellfileGadget={&VerGadget,
                               94,30,220,10,
                               GADGHCOMP,
                               RELVERIFY,
                               STRGADGET,
                               (APTR)&QZBorder,
                               NULL,
                               &QuellfileText,
                               0,
                               (APTR)&QuellfileInfo,
                               0,NULL};

/* ZielfileGadget */

UBYTE ZielfileBuffer[MAXSTRSIZE];

struct StringInfo ZielfileInfo={ZielfileBuffer,
                                UndoBuffer,
                                0,
                                MAXSTRSIZE,
                                0,0,0,0,0,0,NULL,0,NULL};

struct IntuiText ZielfileText={3,0,
                               JAM1,
                               -85,0,
                               &MyFont,
                               (UBYTE *)"Zielfile:",
                               NULL};

struct Gadget ZielfileGadget={&QuellfileGadget,
                              94,44,220,10,
                              GADGHCOMP,
                              RELVERIFY,
                              STRGADGET,
                              (APTR)&QZBorder,
                              NULL,
                              &ZielfileText,
                              0,
                              (APTR)&ZielfileInfo,
                              0,NULL};

/* Border Definitionen */


SHORT ZahlVectors[]={0,0,190,0,190,11,0,11,0,1};

struct Border ZahlBorder={-3,-2,
                          1,0,JAM1,
                          5,
                          (SHORT *)ZahlVectors,
                          NULL};
                         
/* Schlüsselzahl Gadget */

UBYTE SchlZahlBuffer[MAXSTRSIZE];

struct StringInfo SchlZahlInfo={SchlZahlBuffer,
                                UndoBuffer,
                                0,
                                MAXSTRSIZE,
                                0,0,0,0,0,0,NULL,0,NULL};
                              
struct IntuiText SchlZahlText={3,0,
                               JAM1,
                               -117,0,
                               &MyFont,
                               (UBYTE *)"Schlüsselzahl:",
                               NULL};
                  
struct Gadget SchlZahlGadget={&ZielfileGadget,
                              126,58,185,10,
                              GADGHCOMP,
                              RELVERIFY|LONGINT,
                              STRGADGET,
                              (APTR)&ZahlBorder,
                              NULL,
                              &SchlZahlText,
                              0,
                              (APTR)&SchlZahlInfo,
                              0,NULL};

