/* **********************************************************************
 * *                                                                    *
 * *   TSC Header File                                                  *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xuif/tsc.h
 *
 *                        COPYRIGHT (c) 2005  BY
 *          SIGMET INCORPORATED, WESTFORD MASSACHUSETTS, U.S.A.
 * 
 * THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
 * ONLY  IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE
 * INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE  OR  ANY OTHER
 * COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
 * OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
 * TRANSFERED.
 */
#ifndef TSC_H
#define TSC_H

#ifdef TSC_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif

#define TSCID_X      0
#define TSCTASK_X    4
#define TSCCMDS_X   17
#define TSCSCAN_X   30
#define TSCRANG_X   35
#define TSCDATA_X   40
#define TSCSTART_X  52
#define TSCSTOP_X   62
#define TSCREPT_X   72
#define TSCRUN_X    82
#define TSCFLAG_X   92

struct tcf_suma_llst_struct
{
  SINT2                       icnt;
  struct task_config_summary *root;
};

/* Scheduler name */

EXTERN char stscname_c[80];

/*The default width and height are set after first XtManagedChild call*/
EXTERN SINT2 itsc_defl_width_c;
EXTERN SINT2 itsc_defl_height_c;

/*  Memory allocation for the hot tcf ( which is the highlighed item in the
    list ) and equivalent text, and the corresponding xmstring.
*/
EXTERN struct tcf_suma_llst_struct tcfsumallst_c;
EXTERN struct task_config_summary     hottcfsuma_c, tcfsuma_c;

/* Widgets & Function Prototypes */

EXTERN Widget tsc_mainbar;
EXTERN Widget tsc_filebtn, tsc_filepdw;
EXTERN Widget tsc_menubtn, tsc_menupdw;
EXTERN Widget tsc_cmdsbtn, tsc_cmdspdw;
EXTERN Widget tsc_actpsvbtn, tsc_actpsvpdw;
EXTERN Widget tsc_helpbtn, tsc_helppdw;
EXTERN Widget tsc_printpdw;

void tsc_file_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );
EXTERN XsFLB* tsc_open;
EXTERN Widget tsc_svaspop, tsc_svashelppop;
EXTERN Widget tschelp_fnampop;
EXTERN XsFLB* tsc_dele;

void tsc_menu_cbf( Widget wgt, int idx_a, XmPushButtonCallbackStruct* cbd );
void tsc_cmds_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );
void tsc_actpsv_cbf(Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );

EXTERN Widget tsc_legendlab;
EXTERN Widget tsc_mainlst;
void tsc_mainlst_cbf( Widget wgt,char* tag,XmListCallbackStruct* cbd );
void tsc_postit( Widget wgtbase_a, void *wgtpop_a, XEvent *evt_a, Boolean *lCont );
void tsc_start_cbf( Widget wgt, char* tag, XmAnyCallbackStruct* cbd );
void tsc_stop_cbf( Widget wgt, char* tag, XmAnyCallbackStruct* cbd );
void tsc_rept_cbf( Widget wgt, char* tag, XmAnyCallbackStruct* cbd );
void tsc_rqstbtn_cbf(Widget wgt_a,int idx_a,XmPushButtonCallbackStruct* cbd_a );
void tsc_flagbtn_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a);

EXTERN Widget tsc_taskshl, tsc_taskpop;
void tsc_taskbtn_cbf(Widget wgt_a,int idx_a,XmPushButtonCallbackStruct* cbd_a );
EXTERN XsFLB* tsc_addt;

EXTERN Widget tsc_nullshl;  /* Give Message: Status Only Field */
EXTERN Widget tsc_minorshl; /* Give Message: Minor Task Entry  */
EXTERN Widget tsc_rqstshl;
EXTERN Widget tsc_dumshl;

EXTERN Widget tsc_nametxt;
EXTERN Widget tsc_startshl, tsc_starttxt;
EXTERN Widget tsc_stopshl,  tsc_stoptxt;
EXTERN Widget tsc_reptshl,  tsc_repttxt;

EXTERN Widget tsc_flagshl;

void   tsc_addtlist( char *sdata, UINT4 ilength );
void   tsc_delelist( char *sdata, UINT4 ilength );
void   tsc_openlist( char *sdata, UINT4 ilength );
void   tsc_updateall( char *stokens, char *sdata, UINT4 ilength );

char*  stcfsch_stat_f( SINT2 istat_a, SINT2 iflag_a );
void   TcfSumaLLstDeleteAll( struct tcf_suma_llst_struct *sumalst_a );
void   TcfSumaLLstAdd      ( struct tcf_suma_llst_struct *sumalst_a, 
			     struct task_config_summary *suma_a );
struct task_config_summary* TcfSumaLLstSearch
( struct tcf_suma_llst_struct *sumalst_a, SINT2 id_a );
 
#undef EXTERN
#endif
