home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / xfitsvew.zip / XFITSview / aboutbox.c next >
C/C++ Source or Header  |  1998-04-05  |  3KB  |  75 lines

  1. /* about dialog box  for XFITSview */
  2. /*-----------------------------------------------------------------------
  3. *  Copyright (C) 1998
  4. *  Associated Universities, Inc. Washington DC, USA.
  5. *  This program is free software; you can redistribute it and/or
  6. *  modify it under the terms of the GNU General Public License as
  7. *  published by the Free Software Foundation; either version 2 of
  8. *  the License, or (at your option) any later version.
  9. *
  10. *  This program is distributed in the hope that it will be useful,
  11. *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. *  GNU General Public License for more details.
  14. *-----------------------------------------------------------------------*/
  15.  
  16. #include <Xm/Xm.h> 
  17. #include <stdio.h>
  18. #include "xfitsview.h"
  19. #include "scrolltext.h"
  20.  
  21. /* internal prototype */
  22. void HelpAbout (ScrollTextPtr STextPtr);
  23.  
  24. void HelpAboutCB (Widget w, XtPointer clientData, XtPointer callData) {
  25.   ScrollTextPtr STextPtr;
  26. /* make ScrollText */
  27.   STextPtr = ScrollTextMake (Display_shell, "About XFITSview");
  28.  
  29. /* copy text */
  30.    if (STextPtr) HelpAbout(STextPtr);
  31. /* final setup */
  32.   ScrollTextInit (STextPtr);
  33.   } /* end HelpAboutCB */
  34.  
  35. /* Supply About text */
  36. void HelpAbout (ScrollTextPtr STextPtr)  {
  37.     int loop, next, length;
  38.     char *line[] = {
  39. "XFITSview 1.2 Viewer for images in FITS format ",
  40. "Copyright NRAO/AUI 1996-1998 ",
  41. " ",
  42. "   This software is distributed free of charge by NRAO. ",
  43. "The (USA) National Radio Astronomy Observatory (http://www.nrao.edu/) ",
  44. "is a facility of the (USA) National Science Foundation operated under ",
  45. "cooperative agreement by Associated Universities, Inc.  ",
  46. "(http://www.aui.edu).  The FITSview home page is ", 
  47. "http://www.cv.nrao.edu/~bcotton/fitsview.html.",
  48. "Only very limited user support of this software is available.",
  49. "Suggestions and comments should be sent to Bill Cotton at NRAO ",
  50. "(bcotton@nrao.edu). NRAO's headquarters address is:  ",
  51. "National Radio Astronomy Observatory ",
  52. "520 Edgemont Road, ",
  53. "Charlottesville, VA 22903, USA",
  54. " ",
  55. "This Software is distributed in the hope that it will be useful, but ",
  56. "WITHOUT ANY WARRANTY; without even the implied warranty of ",
  57. "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ",
  58. " ",
  59. "*** FINISHED ***" }; /* end of text */
  60.     loop = 0;
  61.     next = STextPtr->num_lines;
  62.     while (1) { /* loop till done */
  63.       if (!strcmp (line[loop], "*** FINISHED ***")) break; /* Finished */
  64.       if (next>=MAX_LINE) break;
  65.       /* copy */
  66.       length = strlen(line[loop]);
  67.       STextPtr->lines[next] = (char*)malloc(length+1);
  68.       strcpy (STextPtr->lines[next], line[loop]);
  69.       loop++; next++;
  70.     } /* end loop loading info */
  71.     STextPtr->num_lines = next; /* save number in ScrollText */
  72.   } /* end HelpAbout */
  73.  
  74.  
  75.