home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / maestro / source / videofrm / utils.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-15  |  2.7 KB  |  93 lines

  1. /*
  2.  * Copyright (c) 1992 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software and 
  5.  * its documentation for any purpose is hereby granted without fee, provided
  6.  * that (i) the above copyright notices and this permission notice appear in
  7.  * all copies of the software and related documentation, and (ii) the name
  8.  * Stanford may not be used in any advertising or publicity relating to
  9.  * the software without the specific, prior written permission of
  10.  * Stanford.
  11.  * 
  12.  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  13.  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  14.  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  15.  *
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
  17.  * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
  18.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
  19.  * ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
  20.  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  21.  * SOFTWARE.
  22.  */
  23.  
  24. /* $Header: /Source/Media/drapeau/VideoFrame/RCS/utils.c,v 1.1 92/07/14 14:35:20 drapeau Exp $ */
  25. /* $Log:    utils.c,v $
  26.  * Revision 1.1  92/07/14  14:35:20  drapeau
  27.  * Initial revision
  28.  *  */
  29.  
  30. #include "VideoFrame.h"
  31.  
  32. static char utilsRcsid[] = "$Header: /Source/Media/drapeau/VideoFrame/RCS/utils.c,v 1.1 92/07/14 14:35:20 drapeau Exp $";
  33.  
  34.  
  35. /*
  36.  * This function displays a notice prompt,  used to alert the
  37.  * author that something is wrong.
  38.  */
  39. void AlertMessage(char*    msg1, char* msg2)
  40. {
  41.   notice_prompt(VideoFrame_mainWindow->mainWindow, NULL,
  42.         NOTICE_MESSAGE_STRINGS,
  43.         msg1, msg2,
  44.         NULL,
  45.         NOTICE_BUTTON, "OK", 100,
  46.         NULL);
  47.   return;
  48. }                                    /* end function AlertMessage */
  49.  
  50.  
  51.  
  52. /*
  53.  * This function formats a string for printing on a scrolled list.
  54.  */
  55. void FormatEntry(int whichItem, Edit* listItem, char* label)
  56. {
  57.   sprintf(label, " %5d.  %s", whichItem + 1, listItem->label);
  58.   return;
  59. }                                    /* end function FormatEntry */
  60.  
  61.  
  62. void EmptyList(Edit* theList)
  63. {
  64.   int    i;
  65.   
  66.   for (i=0; i < numEdits; i++)                        /* Delete all the entries in the edit list */
  67.   {
  68.     xv_set(VideoFrame_mainWindow->editList,
  69.        PANEL_LIST_DELETE, 0,
  70.        NULL);
  71.   }
  72.   return;
  73. }                                    /* end function EmptyList */
  74.  
  75.  
  76.  
  77. void UpdateHeader (void)
  78. {
  79.   char    label[MAXPATHLEN+32];
  80.   
  81.   if (unsavedChanges == True)
  82.   {
  83.     sprintf(label, "VideoFrame Document : \"%s\" (modified)",
  84.         editListFileName);
  85.   }
  86.   else
  87.   {
  88.     sprintf(label, "VideoFrame Document : \"%s\" ", editListFileName);
  89.   }
  90.   xv_set(VideoFrame_mainWindow->mainWindow,                /* Print the new label string on the title bar */
  91.      XV_LABEL, label, NULL);
  92. }                                    /* end function UpdateHeader */
  93.