home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / text / tex / pastex / source / driver / show / amiga / gadget.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-10  |  10.7 KB  |  472 lines

  1. #ifdef AMIGA
  2.  
  3.  
  4. #define SYS_GAD_Y    1
  5.  
  6.  
  7. struct ExtGadget    * pg_pot_Gad,        // BOOPSI
  8.             * pg_left_Gad,
  9.             * pg_right_Gad,
  10.             * pg_int_Gad;
  11.  
  12.  
  13.  
  14.  
  15. #if 0 // -----------------------------------------------
  16.  
  17. static struct IntuiText firstPage_Title =
  18.  {
  19.     1, 0, JAM2, 0, 0, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"--",
  20.     (struct IntuiText*)NULL
  21.  };
  22. static struct IntuiText prevPage_Title =
  23.  {
  24.     1, 0, JAM2, 0, 0, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"-",
  25.     (struct IntuiText*)NULL
  26.  };
  27. static struct IntuiText lastPage_Title =
  28.  {
  29.     1, 0, JAM2, 0, 0, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"++",
  30.     (struct IntuiText*)NULL
  31.  };
  32. static struct IntuiText succPage_Title =
  33.  {
  34.     1, 0, JAM2, 0, 0, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"+",
  35.     (struct IntuiText*)NULL
  36.  };
  37. static struct IntuiText dir_gad_Title =
  38.  {
  39.     0, 1, JAM1, -9, 1, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"D",
  40.     (struct IntuiText*)NULL
  41.  };
  42. static struct IntuiText fil_gad_Title =
  43.  {
  44.     0, 1, JAM1, -9, 1, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"F",
  45.     (struct IntuiText*)NULL
  46.  };
  47. static struct IntuiText int_gad_Title =
  48.  {
  49.     0, 1, JAM1, -9, 1, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"#",
  50.     (struct IntuiText*)NULL
  51.  };
  52.  
  53. static UBYTE    dir_buffer[200],
  54.         dir_buffer_undo[200],
  55.         fil_buffer[200],
  56.         fil_buffer_undo[200],
  57.         int_buffer[5],
  58.         int_buffer_undo[5];
  59.  
  60. static struct StringInfo dir_strInfo =
  61.  {
  62.     dir_buffer, dir_buffer_undo, 0, 199, 0, 0, 0, 0,
  63.     0, 0, NULL, 0L,
  64.     (struct KeyMap*)NULL
  65.  },
  66.           fil_strInfo =
  67.  {
  68.     fil_buffer, fil_buffer_undo, 0, 199, 0, 0, 0, 0,
  69.     0, 0, NULL, 0L,
  70.     (struct KeyMap*)NULL
  71.  },
  72.           int_strInfo =
  73.  {
  74.     int_buffer, int_buffer_undo, 0, 4, 0, 0, 0, 0,
  75.     0, 0, NULL, 0L,
  76.     (struct KeyMap*)NULL
  77.  };
  78.  
  79.  
  80. struct Gadget first_Page_Gad =
  81.  {
  82.     (struct Gadget*)NULL, PA1_LEFT_EDGE, SYS_GAD_Y,
  83.     16, 10, GADGHCOMP, RELVERIFY | TOPBORDER ,
  84.     BOOLGADGET, (APTR)NULL, (APTR)NULL,
  85.     &firstPage_Title, 0L, (APTR)NULL,
  86.     FIRST_GAD_NR, (APTR)NULL
  87.  };
  88. struct Gadget prev_Page_Gad =
  89.  {
  90.     (struct Gadget*)NULL, PA2_LEFT_EDGE, SYS_GAD_Y,
  91.     8, 10, GADGHCOMP, RELVERIFY | TOPBORDER,
  92.     BOOLGADGET, (APTR)NULL, (APTR)NULL,
  93.     &prevPage_Title, 0L, (APTR)NULL,
  94.     PREV_GAD_NR, (APTR)NULL
  95.  };
  96. struct Gadget succ_Page_Gad =
  97.  {
  98.     (struct Gadget*)NULL, PA3_LEFT_EDGE, SYS_GAD_Y,
  99.     8, 10, GADGHCOMP, RELVERIFY | TOPBORDER,
  100.     BOOLGADGET, (APTR)NULL, (APTR)NULL,
  101.     &succPage_Title, 0L, (APTR)NULL,
  102.     SUCC_GAD_NR, (APTR)NULL
  103.  };
  104. struct Gadget last_Page_Gad =
  105.  {
  106.     (struct Gadget*)NULL, PA4_LEFT_EDGE, SYS_GAD_Y,
  107.     16, 10, GADGHCOMP, RELVERIFY | TOPBORDER,
  108.     BOOLGADGET, (APTR)NULL, (APTR)NULL,
  109.     &lastPage_Title, 0L, (APTR)NULL,
  110.     LAST_GAD_NR, (APTR)NULL
  111.  };
  112.  
  113. struct Gadget dir_Gad = 
  114.  {
  115.     (struct Gadget*)NULL, DIR_LEFT_EDGE, SYS_GAD_Y,
  116.     160, 10, GADGHCOMP, RELVERIFY | TOPBORDER,
  117.     STRGADGET, (APTR)NULL, (APTR)NULL,
  118.     (struct IntuiText*)&dir_gad_Title, 0L,
  119.     (APTR)&dir_strInfo,
  120.     DIR_GAD_NR, (APTR)NULL
  121.  };
  122. struct Gadget fil_Gad = 
  123.  {
  124.     (struct Gadget*)NULL, STR_LEFT_EDGE, SYS_GAD_Y,
  125.     104, 10, GADGHCOMP, RELVERIFY | STRINGCENTER | TOPBORDER,
  126.     STRGADGET, (APTR)NULL, (APTR)NULL,
  127.     (struct IntuiText*)&fil_gad_Title, 0L,
  128.     (APTR)&fil_strInfo,
  129.     FIL_GAD_NR, (APTR)NULL
  130.  };
  131. struct Gadget int_Gad = 
  132.  {
  133.     (struct Gadget*)NULL, INT_LEFT_EDGE, SYS_GAD_Y,
  134.     30, 10, GADGHCOMP, RELVERIFY | LONGINT | TOPBORDER,
  135.     STRGADGET, (APTR)NULL, (APTR)NULL,
  136.     (struct IntuiText*)&int_gad_Title, 0L,
  137.     (APTR)&int_strInfo,
  138.     INT_GAD_NR, (APTR)NULL
  139.  };
  140.  
  141. #endif // -----------------------------------------
  142.  
  143.  
  144.  
  145.  
  146.  
  147. struct PropInfo potx_PropInfo,
  148.         poty_PropInfo;
  149. struct Image    potx_Image,
  150.         poty_Image;
  151.  
  152. struct ExtGadget potx_Gad =
  153.  {
  154.     (struct Gadget*)NULL,
  155.     0, 0,
  156.     0, 0,  /* wird spaeter besetzt */
  157.     GFLG_GADGHCOMP | GFLG_RELBOTTOM | GFLG_RELWIDTH | GFLG_EXTENDED,
  158.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_BOTTOMBORDER | GACT_FOLLOWMOUSE,
  159.     GTYP_PROPGADGET,
  160.     &potx_Image,
  161.     NULL,
  162.     NULL, 0L,
  163.     (APTR)&potx_PropInfo,
  164.     POTX_GAD_NR, NULL,
  165.     
  166.     GMORE_GADGETHELP,
  167.     0, 0, 0, 0
  168.  };
  169. struct ExtGadget poty_Gad =
  170.  {
  171.     (struct Gadget*)NULL,
  172.     0, 0,
  173.     0, 0,  /* wird spaeter besetzt */
  174.     GFLG_GADGHCOMP | GFLG_RELRIGHT | GFLG_RELHEIGHT | GFLG_EXTENDED,
  175.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER | GACT_FOLLOWMOUSE,
  176.     GTYP_PROPGADGET,
  177.     &poty_Image,
  178.     NULL,
  179.     NULL, 0L,
  180.     (APTR)&poty_PropInfo,
  181.     POTY_GAD_NR, NULL,
  182.     
  183.     GMORE_GADGETHELP,
  184.     0, 0, 0, 0
  185.  };
  186.  
  187.  
  188. struct ExtGadget potx_left_Gad =
  189.  {
  190.     (struct Gadget*)NULL,
  191.     0, 0,
  192.     (SHORT)WIDTH_X_GADGETS, (SHORT)HEIGHT_SCROLL_BAR,
  193.     GFLG_GADGIMAGE | GFLG_RELBOTTOM | GFLG_RELRIGHT | GFLG_GADGHIMAGE | GFLG_EXTENDED,
  194.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_BOTTOMBORDER,
  195.     BOOLGADGET /* | GZZGADGET */, 
  196.     NULL, NULL,
  197.     NULL, 0L, (APTR)NULL,
  198.     POTX_PFEIL_LINKS_GAD_NR, (APTR)NULL,
  199.     
  200.     GMORE_GADGETHELP,
  201.     0, 0, 0, 0
  202.  };
  203.  
  204.  
  205. struct ExtGadget potx_right_Gad =
  206.  {
  207.     (struct Gadget*)NULL,
  208.     0, 0,
  209.     (SHORT)WIDTH_X_GADGETS, (SHORT)HEIGHT_SCROLL_BAR,
  210.     GFLG_GADGIMAGE | GFLG_GADGHIMAGE | GFLG_RELBOTTOM | GFLG_RELRIGHT | GFLG_EXTENDED,
  211.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_BOTTOMBORDER,
  212.     BOOLGADGET /* | GZZGADGET */, 
  213.     NULL, NULL,
  214.     NULL, 0L, (APTR)NULL,
  215.     POTX_PFEIL_RECHTS_GAD_NR, (APTR)NULL,
  216.     
  217.     GMORE_GADGETHELP,
  218.     0, 0, 0, 0
  219.  };
  220.  
  221.  
  222. struct ExtGadget poty_up_Gad =
  223.  {
  224.     (struct Gadget*)NULL,
  225.     0, 0,
  226.     WIDTH_SCROLL_BAR, HEIGHT_UD_ARROW,
  227.     GFLG_GADGHIMAGE | GFLG_GADGIMAGE | GFLG_RELRIGHT | GFLG_RELBOTTOM | GFLG_EXTENDED,
  228.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  229.     BOOLGADGET /* | GZZGADGET */, 
  230.     NULL, NULL,
  231.     NULL, 0L, (APTR)NULL,
  232.     POTY_PFEIL_OBEN_GAD_NR, (APTR)NULL,
  233.     
  234.     GMORE_GADGETHELP,
  235.     0, 0, 0, 0
  236.  };
  237.  
  238. struct ExtGadget poty_up2_Gad =
  239.  {
  240.     (struct Gadget*)NULL,
  241.     0, 0,
  242.     WIDTH_SCROLL_BAR, HEIGHT_UD_ARROW,
  243.     GFLG_GADGHIMAGE | GFLG_GADGIMAGE | GFLG_RELRIGHT | GFLG_RELWIDTH | GFLG_EXTENDED,
  244.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  245.     BOOLGADGET /* | GZZGADGET */, 
  246.     NULL, NULL,
  247.     NULL, 0L, (APTR)NULL,
  248.     POTY_PFEIL_OBEN2_GAD_NR, (APTR)NULL,
  249.     
  250.     GMORE_GADGETHELP,
  251.     0, 0, 0, 0
  252.  };
  253.  
  254.  
  255. struct ExtGadget poty_down_Gad =
  256.  {
  257.     (struct Gadget*)NULL,
  258.     0, 0,
  259.     WIDTH_SCROLL_BAR, HEIGHT_UD_ARROW,
  260.     GFLG_GADGHIMAGE | GFLG_GADGIMAGE | GFLG_RELRIGHT | GFLG_RELBOTTOM | GFLG_EXTENDED,
  261.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  262.     BOOLGADGET /* | GZZGADGET */,
  263.     NULL, NULL,
  264.     NULL, 0L, (APTR)NULL,
  265.     POTY_PFEIL_UNTEN_GAD_NR, (APTR)NULL,
  266.     
  267.     GMORE_GADGETHELP,
  268.     0, 0, 0, 0
  269.  };
  270.  
  271. struct ExtGadget poty_down2_Gad =
  272.  {
  273.     (struct Gadget*)NULL,
  274.     0, 0,
  275.     WIDTH_SCROLL_BAR, HEIGHT_UD_ARROW,
  276.     GFLG_GADGHIMAGE | GFLG_GADGIMAGE | GFLG_RELRIGHT | GFLG_RELWIDTH | GFLG_EXTENDED,
  277.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  278.     BOOLGADGET /* | GZZGADGET */,
  279.     NULL, NULL,
  280.     NULL, 0L, (APTR)NULL,
  281.     POTY_PFEIL_UNTEN2_GAD_NR, (APTR)NULL,
  282.     
  283.     GMORE_GADGETHELP,
  284.     0, 0, 0, 0
  285.  };
  286.  
  287. #if 0
  288. struct Gadget blatt_Gad =
  289.  {
  290.     (struct Gadget*)NULL,
  291.     0, 0,
  292.     0, 0,
  293.     GADGHCOMP | GADGIMAGE | GFLG_RELRIGHT | GFLG_RELBOTTOM,
  294.     GADGIMMEDIATE | RELVERIFY | BOTTOMBORDER,
  295.     BOOLGADGET /* | GZZGADGET */, 
  296.     (APTR)&blatt, (APTR)NULL,
  297.     NULL, 0L, (APTR)NULL,
  298.     BLATT_GAD_NR, (APTR)NULL
  299.  };
  300.  
  301.  
  302. static struct IntuiText blatt_ok_txt =
  303.  {
  304.     1, 0, JAM2, 0, 0, (struct TextAttr*)&GadtxtAttr, (UBYTE*)"OK",
  305.     (struct IntuiText*)NULL
  306.  };
  307.  
  308. struct Gadget blatt_ok_Gad =
  309.  {
  310.     (struct Gadget*)NULL,
  311.     BOK_LEFT_EDGE, SYS_GAD_Y,    /* left edge depends on resolution */
  312.     WIDTH_OK_BLATT_GADGET, HEIGHT_BLATT_GADGET,
  313.     GADGHCOMP /*| GADGIMAGE*/, GADGIMMEDIATE | RELVERIFY | TOPBORDER,
  314.     BOOLGADGET /* | GZZGADGET */,
  315. #if 0
  316.     (APTR)&blatt_ok, (APTR)NULL,
  317. #endif
  318.     (APTR)NULL, (APTR)NULL,
  319.     &blatt_ok_txt, 0L, (APTR)NULL,
  320.     BLATT_OK_GAD_NR, (APTR)NULL
  321.  };
  322.  
  323. static const USHORT chip zahlen[70] = 
  324.  {     0x0006, 0x0009, 0x0009, 0x0009, 0x0009, 0x0009, 0x0006,
  325.      0x0001, 0x0003, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001,
  326.      0x000E, 0x0001, 0x0001, 0x0006, 0x0008, 0x0008, 0x000F,
  327.      0x000E, 0x0001, 0x0001, 0x0006, 0x0001, 0x0001, 0x000E,
  328.      0x000A, 0x000A, 0x000A, 0x000F, 0x0002, 0x0002, 0x0002,
  329.      0x000F, 0x0008, 0x0008, 0x000E, 0x0001, 0x0001, 0x000E,
  330.      0x0007, 0x0008, 0x0008, 0x000E, 0x0009, 0x0009, 0x0006,
  331.      0x000F, 0x0001, 0x0002, 0x0004, 0x0004, 0x0004, 0x0004,
  332.      0x0006, 0x0009, 0x0009, 0x0006, 0x0009, 0x0009, 0x0006,
  333.      0x0006, 0x0009, 0x0009, 0x0007, 0x0001, 0x0001, 0x000E
  334.  };
  335.  
  336. static struct Image zahl_Image =
  337.  {
  338.     0, 0, 4, 7, 1, NULL, 1, 0, NULL
  339.  };
  340. #endif
  341.  
  342.  
  343. #if 0
  344. /* kein CHIP, da es ohnehin kopiert werden muss */
  345. static const USHORT blatt_fast[20] =
  346.  {    0xFFFF, 0xF800,
  347.      0xF272, 0x7800,
  348.      0xE471, 0x3800,
  349.      0xC800, 0x9800,
  350.      0x9000, 0x4800,
  351.      0x9000, 0x4800,
  352.      0xC800, 0x9800,
  353.      0xE471, 0x3800,
  354.      0xF272, 0x7800,
  355.     0xFFFF, 0xF800,
  356.  };
  357.  
  358.  
  359. /* kein CHIP, da es ohnehin kopiert werden muss */
  360. static const USHORT blatt_no_data[20] = 
  361. {    0x0000, 0x0000,
  362.     0x1047, 0x8000,
  363.     0x1848, 0x4000,
  364.     0x1C48, 0x4000,
  365.     0x1648, 0x4000,
  366.     0x1348, 0x4000,
  367.     0x11C8, 0x4000,
  368.     0x10C8, 0x4000,
  369.     0x1047, 0x8000,
  370.     0x0000, 0x0000
  371. };
  372.  
  373. static const USHORT chip blatt_ok_data[20] = 
  374. {    0x0000, 0x0800,
  375.     0x0788, 0x8800,
  376.     0x0849, 0x0800,
  377.     0x084A, 0x0800,
  378.     0x084C, 0x0800,
  379.     0x084A, 0x0800,
  380.     0x0849, 0x0800,
  381.     0x0788, 0x8800,
  382.     0x0000, 0x0800,
  383.     0x0000, 0x0800
  384. };
  385. #endif
  386.  
  387. #if 0
  388. static struct Image img_pgscroll =
  389.  {
  390.    (SHORT)0,(SHORT)0,
  391.    (SHORT)WIDTH_SCROLL+2, (SHORT)2*HEIGHT_UD_ARROW, (SHORT)1,
  392.    (USHORT *)pgscroll, (SHORT)3,(SHORT)0, (struct Image *)NULL
  393.  };
  394.  
  395. static struct Image img_pgscroll_no =
  396.  {
  397.    (SHORT)0,(SHORT)0,
  398.    (SHORT)WIDTH_SCROLL+2, (SHORT)HEIGHT_UD_ARROW, (SHORT)1,
  399.    (USHORT *)pgscroll_no, (SHORT)3,(SHORT)0, (struct Image *)NULL
  400.  };
  401.  
  402. static struct Image img_pgscroll_ok =
  403.  {
  404.    (SHORT)0,(SHORT)0,
  405.    (SHORT)WIDTH_SCROLL+2, (SHORT)HEIGHT_UD_ARROW, (SHORT)1,
  406.    (USHORT *)pgscroll_ok, (SHORT)3,(SHORT)0, (struct Image *)NULL
  407.  };
  408.  
  409. static struct Image img_pgscroll_sel =
  410.  {
  411.    (SHORT)0,(SHORT)0,
  412.    (SHORT)WIDTH_SCROLL+2, (SHORT)2*HEIGHT_UD_ARROW, (SHORT)1,
  413.    (USHORT *)pgscroll_sel, (SHORT)3,(SHORT)0, (struct Image *)NULL
  414.  };
  415.  
  416. static struct Image img_pgscroll_no_sel =
  417.  {
  418.    (SHORT)0,(SHORT)0,
  419.    (SHORT)WIDTH_SCROLL+2, (SHORT)HEIGHT_UD_ARROW, (SHORT)1,
  420.    (USHORT *)pgscroll_no_sel, (SHORT)3,(SHORT)0, (struct Image *)NULL
  421.  };
  422.  
  423. static struct Image img_pgscroll_ok_sel =
  424.  {
  425.    (SHORT)0,(SHORT)0,
  426.    (SHORT)WIDTH_SCROLL+2, (SHORT)HEIGHT_UD_ARROW, (SHORT)1,
  427.    (USHORT *)pgscroll_ok_sel, (SHORT)3,(SHORT)0, (struct Image *)NULL
  428.  };
  429.  
  430.  
  431. struct Gadget pgscroll_Gad =
  432.  {
  433.     (struct Gadget*)NULL,
  434.     0, 0,
  435.     0, 0,
  436.     GFLG_GADGHIMAGE| GFLG_GADGIMAGE | GFLG_RELRIGHT,
  437.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  438.     BOOLGADGET, 
  439.     (APTR)&img_pgscroll, (APTR)&img_pgscroll_sel,
  440.     NULL, 0L, (APTR)NULL,
  441.     PGSCROLL_GAD_NR, (APTR)NULL
  442.  };
  443.  
  444. struct Gadget pgscroll_no_Gad =
  445.  {
  446.     (struct Gadget*)NULL,
  447.     0, 0,
  448.     0, 0,
  449.     GFLG_GADGHIMAGE| GFLG_GADGIMAGE | GFLG_RELRIGHT,
  450.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  451.     BOOLGADGET, 
  452.     (APTR)&img_pgscroll_no, (APTR)&img_pgscroll_no_sel,
  453.     NULL, 0L, (APTR)NULL,
  454.     PGSCROLL_NO_GAD_NR, (APTR)NULL
  455.  };
  456.  
  457. struct Gadget pgscroll_ok_Gad =
  458.  {
  459.     (struct Gadget*)NULL,
  460.     0, 0,
  461.     0, 0,
  462.     GFLG_GADGHIMAGE| GFLG_GADGIMAGE | GFLG_RELRIGHT,
  463.     GACT_IMMEDIATE | GACT_RELVERIFY | GACT_RIGHTBORDER,
  464.     BOOLGADGET, 
  465.     (APTR)&img_pgscroll_ok, (APTR)&img_pgscroll_ok_sel,
  466.     NULL, 0L, (APTR)NULL,
  467.     PGSCROLL_OK_GAD_NR, (APTR)NULL
  468.  };
  469. #endif
  470.  
  471. #endif
  472.