home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / DOpus4-GPL / Program / screendata.c < prev    next >
C/C++ Source or Header  |  2000-01-27  |  18KB  |  480 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. /* Definitions of any data that relates to the Screen display. Includes
  32.    TextAttrs, NewScreen structures and TagItems, and various global data */
  33.  
  34. #include "dopus.h"
  35.  
  36. /* TextAttr structures */
  37.  
  38. struct TextAttr
  39.     main_screen_attr={NULL,0,0,0},          /* Main screen font */
  40.     screen_attr={NULL,8,0,0},               /* General screen font */
  41.     menu_attr={NULL,0,0,0};                 /* Menu font */
  42.  
  43. /* Screen tag lists */
  44.  
  45. UWORD scr_drawinfo[NUMDRIPENS+1];         /* Pen lists */
  46. UWORD zoom_data[]={0,0,640,200};          /* Zoom gadget data */
  47.  
  48. struct TagItem
  49.     mainscreen_tags[]={                     /* Tags for the main screen */
  50.         {SA_DisplayID,0},
  51.         {SA_Pens,(ULONG)scr_drawinfo},
  52.         {SA_PubName,(ULONG)str_arexx_portname},
  53.         {SA_Overscan,OSCAN_TEXT},
  54.         {SA_AutoScroll,TRUE},
  55.         {SA_Interleaved,TRUE},
  56.         {SA_SharePens,TRUE},
  57.         {SA_SysFont,1},
  58.         {TAG_DONE,0}},
  59.  
  60.     stdscreen_tags[]={                      /* Tags for a standard HIRES screen */
  61.         {SA_DisplayID,HIRES_KEY},
  62.         {SA_Pens,(ULONG)scr_drawinfo},
  63.         {TAG_DONE,0}},
  64.  
  65.     mainwindow_tags[]={                     /* Tags for the main window */
  66.         {WA_PubScreen,0},
  67.         {WA_AutoAdjust,TRUE},
  68.         {WA_Zoom,(ULONG)zoom_data},
  69.         {TAG_DONE,0}};
  70.  
  71. /* NewScreen structures */
  72.  
  73. struct ExtNewScreen
  74.     main_scr={                              /* Main screen */
  75.         0,0,0,0,0,
  76.         0,1,
  77.         0,
  78.         CUSTOMSCREEN|SCREENBEHIND|NS_EXTENDED,
  79.         &main_screen_attr,
  80.         (STRPTR)str_arexx_portname,
  81.         NULL,NULL,
  82.         mainscreen_tags},
  83.  
  84.     font_scr={
  85.         0,0,640,0,1,0,1,                      /* Font screen */
  86.         HIRES,
  87.         CUSTOMSCREEN|SCREENBEHIND|SCREENQUIET|NS_EXTENDED,
  88.         NULL,NULL,NULL,NULL,stdscreen_tags},
  89.     blank_scr={                             /* Blank screen */
  90.         0,0,320,STDSCREENHEIGHT,1,0,1,
  91.         0,
  92.         CUSTOMSCREEN|SCREENQUIET,
  93.         NULL,NULL,NULL,NULL,NULL};
  94.  
  95. /* NewWindow structures */
  96.  
  97. struct ExtNewWindow
  98.     main_win={                              /* Main window */
  99.         0,0,0,0,255,255,
  100.         IDCMP_MOUSEBUTTONS|IDCMP_MENUPICK|IDCMP_GADGETUP|
  101.             IDCMP_GADGETDOWN|IDCMP_RAWKEY|IDCMP_MOUSEMOVE|
  102.             IDCMP_DISKINSERTED|IDCMP_DISKREMOVED|IDCMP_INACTIVEWINDOW|
  103.             IDCMP_ACTIVEWINDOW|IDCMP_CLOSEWINDOW|IDCMP_NEWSIZE,
  104.         0,
  105.         NULL,NULL,NULL,NULL,NULL,640,200,65535,65535,CUSTOMSCREEN,
  106.         mainwindow_tags};
  107.  
  108. struct NewWindow
  109.     font_win={                              /* Font window */
  110.         0,0,640,200,255,255,
  111.         IDCMP_MOUSEBUTTONS|IDCMP_RAWKEY|IDCMP_INACTIVEWINDOW,
  112.         WFLG_RMBTRAP|WFLG_BORDERLESS|WFLG_SIMPLE_REFRESH|WFLG_NOCAREREFRESH,
  113.         NULL,NULL,NULL,NULL,NULL,0,0,0,0,CUSTOMSCREEN},
  114.  
  115.     disk_win={                              /* DiskInfo window */
  116.         0,0,0,0,255,255,
  117.         IDCMP_RAWKEY|IDCMP_DISKINSERTED|IDCMP_DISKREMOVED|IDCMP_GADGETUP|IDCMP_VANILLAKEY,
  118.         WFLG_BORDERLESS|WFLG_RMBTRAP|WFLG_ACTIVATE,
  119.         NULL,NULL,NULL,NULL,NULL,0,0,0,0,CUSTOMSCREEN};
  120.  
  121. struct AppWindow *dopus_appwindow=NULL;   /* AppWindow when on Workbench screen */
  122.  
  123.  
  124. /* Definitions for the custom menus */
  125.  
  126. struct Menu menu_menus[5];                /* Custom menus */
  127. struct MenuItem  *menu_menuitem;          /* Custom menu items */
  128. struct IntuiText *menu_intuitext;         /* IntuiText for custom menu items */
  129.  
  130. char *menu_itemnames;                     /* Names of the menu items */
  131. char menu_spaceitemnames[5][80];          /* Space background of menu items */
  132.  
  133. UBYTE menu_real_number[5];                /* The real ordinal number of each menu */
  134.  
  135. /* Internal Screen Data */
  136.  
  137. struct ColourTable screen_pens[16];       /* Colour pen table */
  138.  
  139. USHORT scrdata_norm_width;                /* Normal width of the display */
  140. USHORT scrdata_norm_height;               /* Normal height of the display */
  141. USHORT scrdata_scr_height;                /* Main screen/window height */
  142.  
  143. USHORT scrdata_dispwin_lines;             /* Number of lines in each window */
  144. USHORT scrdata_dispwin_width[2];          /* Displayed width in each window */
  145. USHORT scrdata_dispwin_height;            /* Height of directory windows */
  146. USHORT scrdata_dispwin_nchars[2];         /* Width of each window in characters */
  147. USHORT scrdata_dispwin_ypos;              /* Y-Position of directory windows */
  148. USHORT scrdata_dispwin_left[2];           /* Left edge of directory windows */
  149. USHORT scrdata_dispwin_xpos[2];           /* Left edge of text in windows */
  150. USHORT scrdata_dispwin_center;            /* Center of the two windows */
  151.  
  152. USHORT scrdata_dirwin_xpos[2];            /* Rendered X-Position of each window */
  153. USHORT scrdata_dirwin_ypos[2];            /* Rendered Y-Position of each window */
  154. USHORT scrdata_dirwin_width[2];           /* Rendered width of each window */
  155. USHORT scrdata_dirwin_height;             /* Rendered height of directory windows */
  156. USHORT scrdata_dirwin_bottom;             /* Rendered bottom of each window */
  157. USHORT scrdata_dirwin_center;             /* Rendered center of the two windows */
  158.  
  159. USHORT scrdata_drive_width;               /* Width of the drive gadgets */
  160. USHORT scrdata_gadget_offset;             /* X-Offset of entire gadget display */
  161. USHORT scrdata_gadget_xpos;               /* X-Position of the custom gadgets */
  162. USHORT scrdata_gadget_ypos;               /* Y-Position of the custom gadgets */
  163. USHORT scrdata_gadget_width;              /* Width of the custom gadgets */
  164. USHORT scrdata_gadget_height;             /* Height of the custom gadgets */
  165.  
  166. USHORT scrdata_clock_width;               /* Width of the clock bar */
  167. USHORT scrdata_clock_height;              /* Height of the clock bar */
  168. USHORT scrdata_clock_xpos;                /* x-pos of the clock bar */
  169. USHORT scrdata_clock_ypos;                /* y-pos of the clock bar */
  170. USHORT scrdata_status_xpos;               /* X-Position of the status bar */
  171. USHORT scrdata_status_ypos;               /* Y-Position of the status bar */
  172. USHORT scrdata_status_width;              /* Width of the status bar */
  173. USHORT scrdata_status_height;             /* Height of the status bar */
  174. USHORT scrdata_diskname_width[2];         /* Width of each diskname display */
  175. USHORT scrdata_diskname_height;           /* Height of the diskname displays */
  176. USHORT scrdata_diskname_ypos;             /* Y-Position of the diskname displays */
  177. USHORT scrdata_diskname_xpos[2];          /* X-Position of each diskname display */
  178. USHORT scrdata_prop_height;               /* Height of the vertical sliders */
  179. USHORT scrdata_string_height;             /* Height of the path string gadgets */
  180. USHORT scrdata_closegad_width;            /* Width of the screen close gadget */
  181.  
  182. USHORT scrdata_font_xsize;                /* X-Size of the dir window font */
  183. USHORT scrdata_font_ysize;                /* Y-Size of the dir window font */
  184. USHORT scrdata_font_baseline;             /* Baseline of the dir window font */
  185.  
  186. UBYTE scrdata_is_pal;                     /* Indicates PAL or NTSC system */
  187. UBYTE scrdata_statustext_pos=0;           /* Status text positioning */
  188. LONG scrdata_old_offset_store=-1;         /* Stored offset in directory window */
  189.  
  190. USHORT scrdata_xoffset;                   /* General x-offset */
  191. USHORT scrdata_yoffset;                   /* General y-offset */
  192. USHORT scrdata_width;                     /* Display width */
  193. USHORT scrdata_height;                    /* Display height */
  194.  
  195. /* Definitions of screen objects */
  196.  
  197. struct PropInfo
  198.     vert_propinfo[2]={                      /* Vertical slider PropInfo */
  199.         {FREEVERT|PROPBORDERLESS,0,0,0,0xffff},
  200.         {FREEVERT|PROPBORDERLESS,0,0,0,0xffff}},
  201.  
  202.     horiz_propinfo[2]={                     /* Horizontal slider PropInfo */
  203.         {FREEHORIZ|PROPBORDERLESS,0,0,0x4152,0},
  204.         {FREEHORIZ|PROPBORDERLESS,0,0,0x4152,0}},
  205.  
  206.     drive_propinfo={                        /* Drive banks slider PropInfo */
  207.         FREEVERT|PROPBORDERLESS,0,0,0,0xffff},
  208.  
  209.     gadget_propinfo={                       /* Gadget banks slider PropInfo */
  210.         FREEVERT|PROPBORDERLESS,0,0,0,0xffff};
  211.  
  212. struct Image
  213.     vert_propimage[2],                      /* Vertical slider Image */
  214.     horiz_propimage[2],                     /* Horizontal slider Image */
  215.     drive_propimage={                       /* Drive banks slider Image */
  216.         0,0,8,0,1,NULL,0,0,NULL},
  217.     gadget_propimage={                      /* Gadget banks slider Image */
  218.         0,0,8,0,1,NULL,0,0,NULL};
  219.  
  220. struct StringExtend                       /* Path fields StringExtension */
  221.     string_extend={
  222.         NULL,{0,0},{0,0},SGM_EXITHELP,NULL,NULL,{0,0,0,0}},
  223.  
  224.     requester_stringex={                    /* Requester StringExtension */
  225.         NULL,{0,0},{0,0},0,NULL,NULL,{0,0,0,0}};
  226.  
  227. char str_pathbuffer[2][256];              /* Path fields buffers */
  228. char str_undobuffer[256];                 /* General undo buffer for string gads */
  229.  
  230. struct StringInfo                         /* Path fields StringInfos */
  231.     path_stringinfo[2]={
  232.         {(STRPTR)str_pathbuffer[0],(STRPTR)str_undobuffer,0,256,0},
  233.         {(STRPTR)str_pathbuffer[1],(STRPTR)str_undobuffer,0,256,0}};
  234.  
  235. struct Gadget
  236.     *main_gadgets,                          /* Custom gadgets */
  237.     *drive_gadgets,                         /* Drive gadgets */
  238.  
  239.     path_strgadget[2]={                     /* Path field gadgets */
  240.         {&path_strgadget[1],2,0,0,0,
  241.             GFLG_GADGHCOMP|GFLG_STRINGEXTEND|GFLG_TABCYCLE,
  242.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_TOGGLESELECT,
  243.             GTYP_STRGADGET,NULL,NULL,NULL,NULL,
  244.             (APTR)&path_stringinfo[0],SCRGAD_LEFTSTRING,NULL},
  245.         {NULL,0,0,0,0,
  246.             GFLG_GADGHCOMP|GFLG_STRINGEXTEND|GFLG_TABCYCLE,
  247.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_TOGGLESELECT,
  248.             GTYP_STRGADGET,NULL,NULL,NULL,NULL,
  249.             (APTR)&path_stringinfo[1],SCRGAD_RIGHTSTRING,NULL}},
  250.  
  251.     vert_propgad[2]={                       /* Vertical slider gadgets */
  252.         {&vert_propgad[1],0,0,8,0,
  253.             GFLG_GADGHNONE,
  254.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  255.             GTYP_PROPGADGET,(APTR)&vert_propimage[0],NULL,NULL,NULL,
  256.             (APTR)&vert_propinfo[0],SCRGAD_LEFTPROP,NULL},
  257.         {NULL,0,0,8,0,
  258.             GFLG_GADGHNONE,
  259.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  260.             GTYP_PROPGADGET,(APTR)&vert_propimage[1],NULL,NULL,NULL,
  261.             (APTR)&vert_propinfo[1],SCRGAD_RIGHTPROP,NULL}},
  262.  
  263.     horiz_propgad[2]={                      /* Horizontal slider gadgets */
  264.         {&horiz_propgad[1],0,0,0,5,
  265.             GFLG_GADGHNONE,
  266.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  267.             GTYP_PROPGADGET,(APTR)&horiz_propimage[0],NULL,NULL,NULL,
  268.             (APTR)&horiz_propinfo[0],SCRGAD_LEFTHPROP,NULL},
  269.         {NULL,0,0,0,5,
  270.             GFLG_GADGHNONE,
  271.             GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  272.             GTYP_PROPGADGET,(APTR)&horiz_propimage[1],NULL,NULL,NULL,
  273.             (APTR)&horiz_propinfo[1],SCRGAD_RIGHTHPROP,NULL}},
  274.  
  275.     drive_propgad={                         /* Drive banks slider gadget */
  276.         NULL,0,0,8,0,
  277.         GFLG_GADGHNONE,
  278.         GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  279.         GTYP_PROPGADGET,(APTR)&drive_propimage,NULL,NULL,NULL,
  280.         (APTR)&drive_propinfo,SCRGAD_DRIVEPROP,NULL},
  281.  
  282.     gadget_propgad={                        /* Gadget banks slider gadget */
  283.         NULL,0,0,8,0,
  284.         GFLG_GADGHNONE,
  285.         GACT_IMMEDIATE|GACT_RELVERIFY|GACT_FOLLOWMOUSE,
  286.         GTYP_PROPGADGET,(APTR)&gadget_propimage,NULL,NULL,NULL,
  287.         (APTR)&gadget_propinfo,SCRGAD_GADGETPROP,NULL},
  288.  
  289.     screen_gadgets[24]={                    /* General screen gadgets */
  290.         {&screen_gadgets[1],0,0,2,0,
  291.             GFLG_GADGHCOMP,
  292.             GACT_RELVERIFY,
  293.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  294.             NULL,FUNC_PARENT1,NULL},
  295.         {&screen_gadgets[2],0,0,2,0,
  296.             GFLG_GADGHCOMP,
  297.             GACT_RELVERIFY,
  298.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  299.             NULL,FUNC_PARENT2,NULL},
  300.         {&screen_gadgets[3],0,0,0,0,
  301.             GFLG_GADGHCOMP,
  302.             GACT_RELVERIFY,
  303.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  304.             NULL,FUNC_BUFFERLIST,NULL},
  305.         {&screen_gadgets[4],0,0,0,0,
  306.             GFLG_GADGHCOMP,
  307.             GACT_RELVERIFY,
  308.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  309.             NULL,FUNC_RESELECT,NULL},
  310.         {&screen_gadgets[5],0,0,0,0,
  311.             GFLG_GADGHCOMP,
  312.             GACT_RELVERIFY,
  313.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  314.             NULL,FUNC_SELECT,NULL},
  315.         {&screen_gadgets[6],0,0,0,0,
  316.             GFLG_GADGHCOMP,
  317.             GACT_RELVERIFY,
  318.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  319.             NULL,FUNC_AREXX,NULL},
  320.         {&screen_gadgets[7],0,0,19,0,
  321.             GFLG_GADGHCOMP,
  322.             GACT_RELVERIFY|GACT_TOGGLESELECT,
  323.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  324.             NULL,FUNC_HELP,NULL},
  325.         {&screen_gadgets[8],0,0,19,0,
  326.             GFLG_GADGHCOMP,
  327.             GACT_RELVERIFY,
  328.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  329.             NULL,FUNC_ERRORHELP,NULL},
  330.         {&screen_gadgets[9],0,0,19,0,
  331.             GFLG_GADGHCOMP,
  332.             GACT_RELVERIFY|GACT_TOGGLESELECT,
  333.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  334.             NULL,SCRGAD_TINYFILTER,NULL},
  335.         {&screen_gadgets[10],0,0,19,0,
  336.             GFLG_GADGHCOMP,
  337.             GACT_RELVERIFY,
  338.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  339.             NULL,FUNC_CONFIGURE,NULL},
  340.         {&screen_gadgets[11],0,0,19,0,
  341.             GFLG_GADGHCOMP,
  342.             GACT_RELVERIFY,
  343.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  344.             NULL,FUNC_ICONIFY,NULL},
  345.         {&screen_gadgets[12],0,0,19,0,
  346.             GFLG_GADGHCOMP,
  347.             GACT_RELVERIFY,
  348.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  349.             NULL,FUNC_QUIT,NULL},
  350.         {&screen_gadgets[13],0,0,16,0,
  351.             GFLG_GADGHCOMP,
  352.             GACT_IMMEDIATE|GACT_RELVERIFY,
  353.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  354.             NULL,SCRGAD_MOVELEFT1,NULL},
  355.         {&screen_gadgets[14],0,0,16,0,
  356.             GFLG_GADGHCOMP,
  357.             GACT_IMMEDIATE|GACT_RELVERIFY,
  358.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  359.             NULL,SCRGAD_MOVELEFT2,NULL},
  360.         {&screen_gadgets[15],0,0,16,0,
  361.             GFLG_GADGHCOMP,
  362.             GACT_IMMEDIATE|GACT_RELVERIFY,
  363.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  364.             NULL,SCRGAD_MOVERIGHT1,NULL},
  365.         {&screen_gadgets[16],0,0,16,0,
  366.             GFLG_GADGHCOMP,
  367.             GACT_IMMEDIATE|GACT_RELVERIFY,
  368.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  369.             NULL,SCRGAD_MOVERIGHT2,NULL},
  370.         {&screen_gadgets[17],0,0,0,9,
  371.             GFLG_GADGHCOMP,
  372.             GACT_IMMEDIATE|GACT_RELVERIFY,
  373.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  374.             NULL,SCRGAD_MOVEUP1,NULL},
  375.         {&screen_gadgets[18],0,0,0,9,
  376.             GFLG_GADGHCOMP,
  377.             GACT_IMMEDIATE|GACT_RELVERIFY,
  378.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  379.             NULL,SCRGAD_MOVEUP2,NULL},
  380.         {&screen_gadgets[19],0,0,0,9,
  381.             GFLG_GADGHCOMP,
  382.             GACT_IMMEDIATE|GACT_RELVERIFY,
  383.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  384.             NULL,SCRGAD_MOVEDOWN1,NULL},
  385.         {&screen_gadgets[20],0,0,0,9,
  386.             GFLG_GADGHCOMP,
  387.             GACT_IMMEDIATE|GACT_RELVERIFY,
  388.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  389.             NULL,SCRGAD_MOVEDOWN2,NULL},
  390.         {&screen_gadgets[21],0,0,16,0,
  391.             GFLG_GADGHCOMP,
  392.             GACT_IMMEDIATE|GACT_RELVERIFY,
  393.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  394.             NULL,SCRGAD_BUFFERLEFT1,NULL},
  395.         {&screen_gadgets[22],0,0,16,0,
  396.             GFLG_GADGHCOMP,
  397.             GACT_IMMEDIATE|GACT_RELVERIFY,
  398.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  399.             NULL,SCRGAD_BUFFERLEFT2,NULL},
  400.         {&screen_gadgets[23],0,0,16,0,
  401.             GFLG_GADGHCOMP,
  402.             GACT_IMMEDIATE|GACT_RELVERIFY,
  403.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  404.             NULL,SCRGAD_BUFFERRIGHT1,NULL},
  405.         {NULL,0,0,16,0,
  406.             GFLG_GADGHCOMP,
  407.             GACT_IMMEDIATE|GACT_RELVERIFY,
  408.             GTYP_BOOLGADGET,NULL,NULL,NULL,NULL,
  409.             NULL,SCRGAD_BUFFERRIGHT2,NULL}},
  410.  
  411.     size_gadgets[]={
  412.         {&size_gadgets[1],0,0,0,0,
  413.         GFLG_GADGHNONE,
  414.         GACT_IMMEDIATE|GACT_RELVERIFY,
  415.         GTYP_SIZING,NULL,NULL,NULL,NULL,
  416.         NULL,65000,NULL},
  417.         {NULL,0,0,0,0,
  418.         GFLG_GADGHNONE,
  419.         GACT_IMMEDIATE|GACT_RELVERIFY,
  420.         GTYP_SIZING,NULL,NULL,NULL,NULL,
  421.         NULL,65000,NULL}};
  422.  
  423. struct RMBGadget
  424.     mainrmbgads[7]={                        /* Screen right mouse button gadgets */
  425.         {&mainrmbgads[1],
  426.             0,0,0,0,0,FUNC_NEXTDRIVES},         /* Drive banks (NextDrives) */
  427.         {&mainrmbgads[2],
  428.             0,0,0,0,0,FUNC_CLEARBUFFERS},       /* B tiny gadget (clear buffers) */
  429.         {&mainrmbgads[3],
  430.             0,0,0,0,0,FUNC_RESCAN},             /* R tiny gadget (rescan) */
  431.         {&mainrmbgads[4],
  432.             0,0,0,0,0,FUNC_DEVICELIST},         /* S tiny gadget (device list) */
  433.         {&mainrmbgads[5],
  434.             0,0,0,0,0,FUNC_DIRTREE},            /* A tiny gadget (dir tree) */
  435.         {&mainrmbgads[6],
  436.             0,0,0,0,0,FUNC_ROOT},               /* Left parent gadget (root) */
  437.         {NULL,
  438.             0,0,0,0,0,FUNC_ROOT}};              /* Right parent gadget (root) */
  439.  
  440. /* Click-M-Click dragging data */
  441.  
  442. struct VSprite drag_sprite={              /* VSprite used for dragging */
  443.     NULL,NULL,NULL,NULL,0,0,
  444.     SAVEBACK,0,0,0,0,0,0,0,
  445.     NULL,NULL,NULL,NULL,&drag_bob,0,0};
  446.  
  447. struct Bob drag_bob={                     /* BOB used for dragging */
  448.     0,NULL,NULL,NULL,NULL,
  449.     &drag_sprite,NULL,NULL};
  450.  
  451. struct BitMap drag_bob_bitmap;            /* Bitmap used to render BOB */
  452. struct RastPort drag_bob_rastport;        /* Rastport used to render BOB */
  453.  
  454. PLANEPTR drag_bob_buffer=NULL;            /* BOB buffer */
  455. PLANEPTR drag_bob_savebuffer=NULL;        /* BOB background save buffer */
  456.  
  457. struct GelsInfo drag_gelsinfo={0};        /* GelsInfo structure for BOB */
  458. struct VSprite drag_dummy_sprite1={0};    /* Dummy sprite 1 for GELs list */
  459. struct VSprite drag_dummy_sprite2={0};    /* Dummy sprite 2 for GELs list */
  460.  
  461. /* General screen data */
  462.  
  463. struct Rectangle scr_scroll_borders[2];   /* Scroll borders for dir windows */
  464.  
  465. /* Borders for gadget highlighting */
  466.  
  467. struct DOpusRemember *border_key=NULL;    /* Memory key for border data */
  468.  
  469. struct Border *gadget_sel_border;         /* Borders for main gadgets */
  470. struct Border *gadget_unsel_border;
  471.  
  472. struct Border *gadget_dog_sel_border;     /* Main gadgets with dog-ears*/
  473. struct Border *gadget_dog_unsel_border;
  474.  
  475. struct Border *drive_sel_border;          /* Borders for drive gadgets */
  476. struct Border *drive_unsel_border;
  477.  
  478. struct Border *drive_bank_sel_border;     /* Borders for the drive bank */
  479. struct Border *drive_bank_unsel_border;
  480.