/*==================================================================
  ==================================================================
  ==	XMusic -- An Interactive Interface to Csound		  ==
  ==       Copyright (C) 1988 by George D. Drapeau                ==
  ==                  All Rights Reserved                         ==
  ==================================================================
  ==================================================================
*/
/* $Log:	infoWin.c,v $
 * Revision 1.2  89/08/06  18:12:46  drapeau
 * Cleaned up the code for the first X11 release.
 *  */

#include <stdio.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/List.h>
#include "defs.h"
#include "externs.h"

void CreateInfoWindow()
{
  static Arg	argList[3] =					    /* Default resources for the ToolInfo popup shell widget */
    {
      {XtNx,(XtArgVal)500},
      {XtNy,(XtArgVal)500},
      {XtNtitle,(XtArgVal)"XMusic:Tool Information"}
    };
  
  static String	toolInfoMessage[] =
    {"No Tool Info Currently Available",
     NULL};

  infoWidget	= XtCreatePopupShell("ToolInfo",		    /* Create a Popup shell for the Info window */
				     shellWidgetClass,
				     topLevelShell,
				     argList,XtNumber(argList));
  XtSetArg(argList[0],XtNlist,(XtArgVal)toolInfoMessage);	    /* Make the list widget use the 'toolInfoMessage' array */
  XtSetArg(argList[1],XtNforceColumns,True);			    /* Force the List widget to use number of columns I specify */
  XtSetArg(argList[2],XtNdefaultColumns,2);
  infoListWidget= XtCreateManagedWidget("InfoList",		    /* Create a list to hold the information for a tool */
					listWidgetClass,
					infoWidget,
					argList,XtNumber(argList));
  XtAddCallback(infoListWidget,XtNcallback,InfoCallback,NULL);	    /* Tell the list widget to do something when activated */
}								    /* end function CreateInfoWindow */
