home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / dec93 / misc / sci / cp.lha / cP / Source / plotgui.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-21  |  15.8 KB  |  510 lines

  1.  
  2. /*
  3.  *  Source machine generated by GadToolsBox V2.0
  4.  *  which is (c) Copyright 1991-1993 Jaba Development
  5.  *
  6.  *  GUI Designed by : Chris Conger
  7.  */
  8.  
  9. #include <exec/types.h>
  10. #include <intuition/intuition.h>
  11. #include <intuition/classes.h>
  12. #include <intuition/classusr.h>
  13. #include <intuition/imageclass.h>
  14. #include <intuition/gadgetclass.h>
  15. #include <libraries/gadtools.h>
  16. #include <graphics/displayinfo.h>
  17. #include <graphics/gfxbase.h>
  18. #include <clib/exec_protos.h>
  19. #include <clib/intuition_protos.h>
  20. #include <clib/gadtools_protos.h>
  21. #include <clib/graphics_protos.h>
  22. #include <clib/utility_protos.h>
  23. #include <string.h>
  24.  
  25. #include "plotgui.h"
  26. #include "cp.h"
  27.  
  28. extern UBYTE *version_string;
  29.  
  30. struct Screen         *Scr = NULL;
  31. APTR                   VisualInfo = NULL;
  32. struct Window         *PlotWindowWnd = NULL;
  33. struct Window         *delwinWnd = NULL;
  34. struct Gadget         *PlotWindowGList = NULL;
  35. struct Gadget         *delwinGList = NULL;
  36. struct Menu           *PlotWindowMenus = NULL;
  37. struct IntuiMessage    PlotWindowMsg;
  38. struct IntuiMessage    delwinMsg;
  39. struct Gadget         *PlotWindowGadgets[6];
  40. struct Gadget         *delwinGadgets[3];
  41. UWORD                  SWIDTH = STDSCREENWIDTH;
  42. UWORD                  SHEIGHT = STDSCREENHEIGHT;
  43. UWORD                  delwinLeft = 80;
  44. UWORD                  delwinTop = 40;
  45. UWORD                  delwinWidth = 200;
  46. UWORD                  delwinHeight = 140;
  47. UBYTE                 *PlotWindowWdt = (UBYTE *)"PWin";
  48. UBYTE                 *delwinWdt = (UBYTE *)"Delete Trace";
  49.  
  50. WORD GADHEIGHT;
  51. WORD GADWIDTH;
  52.  
  53. /*struct TextAttr cPFont = {
  54.      ( STRPTR )"topaz.font", 8, 0x00, 0x00 };
  55. */
  56.  
  57. struct NewMenu PlotWindowNewMenu[] = {
  58.      NM_TITLE, (STRPTR)"Project", NULL, 0, NULL, NULL,
  59.      NM_ITEM, (STRPTR)"Open File", (STRPTR)"O", 0, 0L, (APTR)newfile,
  60.      NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL,
  61.      NM_ITEM, (STRPTR)"Add File", (STRPTR)"A", 0, 0L, (APTR)addClicked,
  62.      NM_ITEM, (STRPTR)"Delete Set", (STRPTR)"D", 0, 0L, (APTR)deleteClicked,
  63.      NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL,
  64.      NM_ITEM, (STRPTR)"About", NULL, 0, 0L, (APTR)PlotWindowItem0,
  65.      NM_ITEM, (STRPTR)"Die", (STRPTR)"Q", 0, 0L, (APTR)PlotWindowItem1,
  66.      NM_TITLE, (STRPTR)"Axis", NULL, 0, NULL, NULL,
  67.      NM_ITEM, (STRPTR)"XAxis", NULL, 0, NULL, NULL,
  68.      NM_SUB, (STRPTR)"Lin", NULL, 0, 0L, (APTR)PlotWindowItem2,
  69.      NM_SUB, (STRPTR)"Log", NULL, 0, 0L, (APTR)PlotWindowItem3,
  70.      NM_ITEM, (STRPTR)"YAxis", NULL, 0, NULL, NULL,
  71.      NM_SUB, (STRPTR)"Lin", NULL, 0, 0L, (APTR)PlotWindowItem4,
  72.      NM_SUB, (STRPTR)"Log", NULL, 0, 0L, (APTR)PlotWindowItem5,
  73.      NM_TITLE, (STRPTR)"Display", NULL, 0, NULL, NULL,
  74.      NM_ITEM, (STRPTR)"Full View", (STRPTR)"F", 0L, 0L, (APTR)fullClicked,
  75.      NM_ITEM, (STRPTR)"Grid", (STRPTR)"G", 0L, 0L, (APTR)gridClicked,
  76.      NM_ITEM, (STRPTR)"Symbols", (STRPTR)"Y", 0L, 0L, (APTR)PlotWindowItem6,
  77.      NM_ITEM, (STRPTR)NM_BARLABEL, NULL, 0, 0L, NULL,
  78.      NM_ITEM, (STRPTR)"Control Panel", (STRPTR)"C", 0L, 0L, (APTR)PlotWindowItem7,
  79.      NM_END, NULL, NULL, 0, 0L, NULL };
  80.  
  81.  
  82. UWORD PlotWindowGTypes[] = {
  83.      BUTTON_KIND,
  84.      BUTTON_KIND,
  85.      BUTTON_KIND,
  86.      BUTTON_KIND,
  87.      BUTTON_KIND,
  88.      BUTTON_KIND
  89. };
  90.  
  91. UWORD delwinGTypes[] = {
  92.      LISTVIEW_KIND,
  93.      BUTTON_KIND,
  94.      BUTTON_KIND
  95. };
  96.  
  97. struct NewGadget PlotWindowNGad[] = {
  98.      NULL, NULL, NULL, NULL, (UBYTE *)"_Add", NULL, GD_add, PLACETEXT_IN, NULL, (APTR)addClicked,
  99.      NULL, NULL, NULL, NULL, (UBYTE *)"_Kill", NULL, GD_delete, PLACETEXT_IN, NULL, (APTR)deleteClicked,
  100.      NULL, NULL, NULL, NULL, (UBYTE *)"_Full", NULL, GD_full, PLACETEXT_IN, NULL, (APTR)fullClicked,
  101.      NULL, NULL, NULL, NULL, (UBYTE *)"_Zoom", NULL, GD_zoom, PLACETEXT_IN, NULL, (APTR)zoomClicked,
  102.      NULL, NULL, NULL, NULL, (UBYTE *)"_Grid", NULL, GD_grid, PLACETEXT_IN, NULL, (APTR)gridClicked,
  103.      NULL, NULL, NULL, NULL, (UBYTE *)"_Quit", NULL, GD_quit, PLACETEXT_IN, NULL, (APTR)quitClicked
  104. };
  105.  
  106. struct NewGadget delwinNGad[] = {
  107.      20, 20, 150, 75, NULL, NULL, GD_dellist, NULL, NULL, (APTR)dellistClicked,
  108.      25, 100, 65, 25, (UBYTE *)"_Delete", NULL, GD_delset, PLACETEXT_IN, NULL, (APTR)delsetClicked,
  109.      100, 100, 65, 25, (UBYTE *)"_Redraw", NULL, GD_canlist, PLACETEXT_IN, NULL, (APTR)canlistClicked
  110. };
  111.  
  112. ULONG PlotWindowGTags[] = {
  113.      (GT_Underscore), '_', (TAG_DONE),
  114.      (GT_Underscore), '_', (TAG_DONE),
  115.      (GT_Underscore), '_', (TAG_DONE),
  116.      (GT_Underscore), '_', (TAG_DONE),
  117.      (GT_Underscore), '_', (TAG_DONE),
  118.      (GT_Underscore), '_', (TAG_DONE)
  119. };
  120.  
  121. ULONG delwinGTags[] = {
  122.      (GTLV_ShowSelected), NULL, (TAG_DONE),
  123.      (GT_Underscore), '_', (TAG_DONE),
  124.      (GT_Underscore), '_', (TAG_DONE)
  125. };
  126.  
  127.  
  128. struct ColorSpec MonoColors[] = {
  129.       0, 0x00, 0x00, 0x00,
  130.       1, 0x0F, 0x0E, 0x0D,
  131.      ~0, 0x00, 0x00, 0x00 };
  132.  
  133. struct ColorSpec FourColors[] = {
  134.       0, 0x07, 0x06, 0x06,
  135.       1, 0x0B, 0x0A, 0x0A,
  136.       2, 0x03, 0x01, 0x03,
  137.       3, 0x0F, 0x00, 0x05,
  138.      ~0, 0x00, 0x00, 0x00 };
  139.  
  140. struct ColorSpec EightColors[] = {
  141.       0, 0x08, 0x06, 0x06,
  142.       1, 0x00, 0x00, 0x00,
  143.       2, 0x0C, 0x0C, 0x0F,
  144.       3, 0x09, 0x07, 0x08,
  145.       4, 0x0A, 0x09, 0x0F,
  146.       5, 0x0F, 0x0E, 0x08,
  147.       6, 0x05, 0x04, 0x05,
  148.       7, 0x0F, 0x0F, 0x0F,
  149.      ~0, 0x00, 0x00, 0x00 };
  150.  
  151. struct ColorSpec SixteenColors[] = {
  152.       0, 0x08, 0x06, 0x06,
  153.       1, 0x00, 0x00, 0x00,
  154.       2, 0x0C, 0x0C, 0x0F,
  155.       3, 0x09, 0x07, 0x08,
  156.       4, 0x0A, 0x09, 0x0F,
  157.       5, 0x0F, 0x0E, 0x08,
  158.       6, 0x0F, 0x05, 0x06,
  159.       7, 0x00, 0x0F, 0x09,
  160.       8, 0x0D, 0x07, 0x0D,
  161.       9, 0x03, 0x06, 0x0C,
  162.      10, 0x0F, 0x09, 0x08,
  163.      11, 0x0B, 0x02, 0x0F,
  164.      12, 0x01, 0x0F, 0x0D,
  165.      13, 0x0F, 0x00, 0x08,
  166.      14, 0x05, 0x04, 0x05,
  167.      15, 0x0F, 0x0F, 0x0F,
  168.      ~0, 0x00, 0x00, 0x00 };
  169.  
  170. UWORD DriPens[] = {
  171.      0,1,2,2,1,3,2,0,2,~0 };
  172.  
  173. UWORD TwoPens[] = {
  174.      0,1,2,1,2,3,2,0,2,~0 };
  175.  
  176.  
  177. int SetupScreen( void )
  178. {
  179. UBYTE PubNum[4];
  180. struct List    *publist;
  181. struct PubScreenNode *psnode;
  182. WORD  s=0,t;
  183. WORD len;
  184. struct ColorSpec *ScreenColors;
  185. UBYTE PubName[8];
  186.  
  187.     strcpy(PubName,"cP");
  188.     len = (WORD) strlen( PubName );
  189.  
  190.     publist = LockPubScreenList();                /* Lock the public screen list     */
  191.  
  192.     for (psnode = (struct PubScreenNode *) publist->lh_Head; psnode->psn_Node.ln_Succ; psnode = (struct PubScreenNode *) psnode->psn_Node.ln_Succ)
  193.       {
  194.           if ( ! Strnicmp( psnode-> psn_Node.ln_Name, PubName, len))
  195.             {
  196.                t = 0;
  197.                sscanf( &psnode-> psn_Node.ln_Name [len],"%hd", &t);
  198.                s = max(s,t);
  199.             }
  200.       }
  201.  
  202.      UnlockPubScreenList ();
  203.  
  204.      sprintf( PubNum,"%hd", s+1 );
  205.      strcpy ( PubName,"cP");
  206.      strcat ( PubName, PubNum);         /* Add #s of other cP screens to name */
  207.  
  208.      if ( depth == 1 ) ScreenColors = &MonoColors[0];
  209.      if ( depth == 2 ) ScreenColors = &FourColors[0];
  210.      if ( depth == 3 ) ScreenColors = &EightColors[0];
  211.      if ( depth == 4 ) ScreenColors = &SixteenColors[0];
  212.  
  213.      if ( depth == 1 )
  214.        {
  215.           DriPens[0] = ~0;
  216.        }
  217.  
  218.      if ( ! ( Scr = OpenScreenTags( NULL, SA_Left,     0,
  219.                          SA_Top,        0,
  220.                          SA_Width,      SWIDTH,
  221.                          SA_Height,     SHEIGHT,
  222.                          SA_Depth,      depth,
  223.                          SA_Colors,     ScreenColors,
  224.                          SA_Font,       cPFont,
  225.                          SA_Type,       PUBLICSCREEN,
  226.                          SA_PubName,    PubName,
  227.                          SA_DisplayID,  DEFAULT_MONITOR_ID | Disp,
  228.                          SA_Overscan,   OSCAN_TEXT,
  229.                          SA_AutoScroll, TRUE,
  230.                          SA_Pens,       (depth == 2 ? &TwoPens[0] : &DriPens[0]),
  231.                          SA_Title,      &version_string[5],
  232.                          TAG_DONE )))
  233.           return( 1L );
  234.  
  235.      if ( ! ( VisualInfo = GetVisualInfo( Scr, TAG_DONE )))
  236.           return( 2L );
  237.  
  238.      PubScreenStatus( Scr, NULL );      /* make screen public */
  239.      if ( DEFS ) SetDefaultPubScreen( PubName );  /* make screen default pub if DEFS True */
  240.  
  241.      return( 0L );
  242. }
  243.  
  244. void CloseDownScreen( void )
  245. {
  246. struct EasyStruct myezreq = {
  247.        sizeof (struct EasyStruct), 0,
  248.        "Close Public Screen",
  249.        "Please Close All Windows on this Screen",
  250.        "OK"
  251.   };
  252.  
  253.      if ( VisualInfo ) {
  254.           FreeVisualInfo( VisualInfo );
  255.           VisualInfo = NULL;
  256.      }
  257.      if ( Scr ) {
  258.  
  259.           PubScreenStatus( Scr, PSNF_PRIVATE );   /* make the screen unavailable */
  260.  
  261.           while( ! CloseScreen( Scr ))
  262.             {
  263.                Forbid();
  264.                EasyRequestArgs( Scr-> FirstWindow, &myezreq, NULL, NULL );
  265.                Permit();
  266.             }
  267.  
  268.      }
  269.      Scr = NULL;
  270. }
  271.  
  272. int HandlePlotWindowIDCMP( void )
  273. {
  274.      struct IntuiMessage *m;
  275.      struct MenuItem          *n;
  276.      int            (*func)();
  277.      BOOL           running = TRUE;
  278.  
  279.      while( m = GT_GetIMsg( PlotWindowWnd->UserPort )) {
  280.  
  281.           CopyMem(( char * )m, ( char * )&PlotWindowMsg, (long)sizeof( struct IntuiMessage ));
  282.  
  283.           GT_ReplyIMsg( m );
  284.  
  285.           switch ( PlotWindowMsg.Class ) {
  286.  
  287.                case IDCMP_REFRESHWINDOW:
  288.                     GT_BeginRefresh( PlotWindowWnd );
  289.                     GT_EndRefresh( PlotWindowWnd, TRUE );
  290.                     break;
  291.  
  292.                case IDCMP_VANILLAKEY:
  293.                     running = PlotWindowVanillaKey();
  294.                     break;
  295.  
  296.                case IDCMP_MOUSEBUTTONS:
  297.                     if (PlotWindowMsg.Code == SELECTDOWN)
  298.                          Identify(PlotWindowMsg.MouseX, PlotWindowMsg.MouseY, TRUE);
  299.                     else if (PlotWindowMsg.Code == SELECTUP)
  300.                          Identify(PlotWindowMsg.MouseX, PlotWindowMsg.MouseY, FALSE);
  301.                     break;
  302.  
  303.                case IDCMP_GADGETUP:
  304.                     func = ( void * )(( struct Gadget * )PlotWindowMsg.IAddress )->UserData;
  305.                     running = func();
  306.                     break;
  307.  
  308.                case IDCMP_MENUPICK:
  309.                     while( PlotWindowMsg.Code != MENUNULL ) {
  310.                          n = ItemAddress( PlotWindowMenus, PlotWindowMsg.Code );
  311.                          func = (void *)(GTMENUITEM_USERDATA( n ));
  312.                          running = func();
  313.                          PlotWindowMsg.Code = n->NextSelect;
  314.                     }
  315.                     break;
  316.           }
  317.      }
  318.      return( running );
  319. }
  320.  
  321. int OpenPlotWindowWindow( void )
  322. {
  323.      struct NewGadget    ng;
  324.      struct Gadget  *g;
  325.      UWORD          lc, tc;
  326.      WORD   GadTop;
  327.  
  328.      if ( ! ( g = CreateContext( &PlotWindowGList )))
  329.           return( 1L );
  330.  
  331.      GADWIDTH  = ( Scr-> Width - 2 * cPFont->ta_YSize ) / PlotWindow_CNT;
  332.      GADHEIGHT = cPFont->ta_YSize * 2;
  333.  
  334.      GadTop = Scr-> Height - Scr-> BarHeight - cPFont->ta_YSize * 3;
  335.  
  336.      for( lc = 0, tc = 0; lc < PlotWindow_CNT; lc++ ) {
  337.  
  338.           PlotWindowNGad[ lc ] . ng_LeftEdge = GADWIDTH * lc + cPFont->ta_YSize;
  339.           PlotWindowNGad[ lc ] . ng_Width    = GADWIDTH;
  340.           PlotWindowNGad[ lc ] . ng_TopEdge  = GadTop;
  341.           PlotWindowNGad[ lc ] . ng_Height   = GADHEIGHT;
  342.  
  343.           CopyMem((char * )&PlotWindowNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget ));
  344.  
  345.           ng.ng_VisualInfo = VisualInfo;
  346.           ng.ng_TextAttr   = cPFont;
  347.  
  348.           PlotWindowGadgets[ lc ] = g = CreateGadgetA((ULONG)PlotWindowGTypes[ lc ], g, &ng, ( struct TagItem * )&PlotWindowGTags[ tc ] );
  349.  
  350.           while( PlotWindowGTags[ tc ] ) tc += 2;
  351.           tc++;
  352.  
  353.           if ( NOT g )
  354.                return( 2L );
  355.      }
  356.  
  357.      if ( ! ( PlotWindowMenus = CreateMenus( PlotWindowNewMenu, GTMN_FrontPen, 0L, TAG_DONE )))
  358.           return( 3L );
  359.  
  360.      LayoutMenus( PlotWindowMenus, VisualInfo, GTMN_TextAttr, cPFont, TAG_DONE );
  361.  
  362.      if ( ! ( PlotWindowWnd = OpenWindowTags( NULL,
  363.                     WA_Left,  0,
  364.                     WA_Top,        Scr-> BarHeight,
  365.                     WA_Width, Scr-> Width,
  366.                     WA_Height,     Scr-> Height - Scr-> BarHeight,
  367.                     WA_IDCMP, BUTTONIDCMP|IDCMP_MOUSEMOVE|IDCMP_MOUSEBUTTONS|IDCMP_MENUPICK|IDCMP_VANILLAKEY,
  368.                     WA_Flags, WFLG_SMART_REFRESH|WFLG_BACKDROP|WFLG_BORDERLESS|WFLG_ACTIVATE,
  369.                     WA_Gadgets,    ( CPANEL ? PlotWindowGList : NULL),
  370.                     WA_ScreenTitle,     &version_string[5],
  371.                     WA_AutoAdjust, TRUE,
  372.                     WA_PubScreen,  Scr,
  373.                     TAG_DONE )))
  374.      return( 4L );
  375.  
  376.      SetMenuStrip( PlotWindowWnd, PlotWindowMenus );
  377.      GT_RefreshWindow( PlotWindowWnd, NULL );
  378.  
  379.      return( 0L );
  380. }
  381.  
  382. void ClosePlotWindowWindow( void )
  383. {
  384.      if ( PlotWindowMenus      ) {
  385.           ClearMenuStrip( PlotWindowWnd );
  386.           FreeMenus( PlotWindowMenus );
  387.           PlotWindowMenus = NULL;  }
  388.  
  389.      if ( PlotWindowWnd        ) {
  390.           CloseWindow( PlotWindowWnd );
  391.           PlotWindowWnd = NULL;
  392.      }
  393.  
  394.      if ( PlotWindowGList      ) {
  395.           FreeGadgets( PlotWindowGList );
  396.           PlotWindowGList = NULL;
  397.      }
  398. }
  399.  
  400. void delwinRender( void )
  401. {
  402.      UWORD          offx, offy;
  403.  
  404.      offx = delwinWnd->BorderLeft;
  405.      offy = delwinWnd->BorderTop;
  406.  
  407.  
  408.      DrawBevelBox( delwinWnd->RPort, offx + 10, offy + 10, 170, 120 , GT_VisualInfo, VisualInfo, GTBB_Recessed, TRUE, TAG_DONE );
  409. }
  410.  
  411. int HandledelwinIDCMP( void )
  412. {
  413.      struct IntuiMessage *m;
  414.      int            (*func)();
  415.      BOOL           running = TRUE;
  416.  
  417.      while( m = GT_GetIMsg( delwinWnd->UserPort )) {
  418.  
  419.           CopyMem(( char * )m, ( char * )&delwinMsg, (long)sizeof( struct IntuiMessage ));
  420.  
  421.           GT_ReplyIMsg( m );
  422.  
  423.           switch ( delwinMsg.Class ) {
  424.  
  425.                case IDCMP_REFRESHWINDOW:
  426.                     GT_BeginRefresh( delwinWnd );
  427.                     delwinRender();
  428.                     GT_EndRefresh( delwinWnd, TRUE );
  429.                     break;
  430.  
  431.                case IDCMP_CLOSEWINDOW:
  432.                     running = delwinCloseWindow();
  433.                     break;
  434.  
  435.                case IDCMP_VANILLAKEY:
  436.                     running = delwinVanillaKey();
  437.                     break;
  438.  
  439.                case IDCMP_GADGETUP:
  440.                case IDCMP_GADGETDOWN:
  441.                     func = ( void * )(( struct Gadget * )delwinMsg.IAddress )->UserData;
  442.                     running = func();
  443.                     break;
  444.           }
  445.      }
  446.      return( running );
  447. }
  448.  
  449. int OpendelwinWindow( void )
  450. {
  451.      struct NewGadget    ng;
  452.      struct Gadget  *g;
  453.      UWORD          lc, tc;
  454.      UWORD          offx = Scr->WBorLeft, offy = Scr->WBorTop + Scr->RastPort.TxHeight + 1;
  455.  
  456.      if ( ! ( g = CreateContext( &delwinGList )))
  457.           return( 1L );
  458.  
  459.      for( lc = 0, tc = 0; lc < delwin_CNT; lc++ ) {
  460.  
  461.           CopyMem((char * )&delwinNGad[ lc ], (char * )&ng, (long)sizeof( struct NewGadget ));
  462.  
  463.           ng.ng_VisualInfo = VisualInfo;
  464.           ng.ng_TextAttr   = cPFont;
  465.           ng.ng_LeftEdge  += offx;
  466.           ng.ng_TopEdge   += offy;
  467.  
  468.           delwinGadgets[ lc ] = g = CreateGadgetA((ULONG)delwinGTypes[ lc ], g, &ng, ( struct TagItem * )&delwinGTags[ tc ] );
  469.  
  470.           while( delwinGTags[ tc ] ) tc += 2;
  471.           tc++;
  472.  
  473.           if ( NOT g )
  474.                return( 2L );
  475.      }
  476.  
  477.      if ( ! ( delwinWnd = OpenWindowTags( NULL,
  478.                     WA_Left,  delwinLeft,
  479.                     WA_Top,        delwinTop,
  480.                     WA_Width, delwinWidth,
  481.                     WA_Height,     delwinHeight + offy,
  482.                     WA_IDCMP, LISTVIEWIDCMP|BUTTONIDCMP|IDCMP_CLOSEWINDOW|IDCMP_VANILLAKEY,
  483.                     WA_Flags, WFLG_DRAGBAR|WFLG_DEPTHGADGET|WFLG_CLOSEGADGET|WFLG_SMART_REFRESH|WFLG_ACTIVATE,
  484.                     WA_Gadgets,    delwinGList,
  485.                     WA_Title, delwinWdt,
  486.                     WA_ScreenTitle,     "Kill",
  487.                     WA_PubScreen,  Scr,
  488.                     TAG_DONE )))
  489.      return( 4L );
  490.  
  491.      GT_RefreshWindow( delwinWnd, NULL );
  492.  
  493.      delwinRender();
  494.  
  495.      return( 0L );
  496. }
  497.  
  498. void ClosedelwinWindow( void )
  499. {
  500.      if ( delwinWnd        ) {
  501.           CloseWindow( delwinWnd );
  502.           delwinWnd = NULL;
  503.      }
  504.  
  505.      if ( delwinGList      ) {
  506.           FreeGadgets( delwinGList );
  507.           delwinGList = NULL;
  508.      }
  509. }
  510.  
  511.