/* **********************************************************************
 * *                                                                    *
 * *   PSC Header File                                                  *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xuif/psc.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.
 */

/*=============================================================================

 PSC header file

=============================================================================*/
#ifndef PSC_H
#define PSC_H

#ifdef PSC_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif


#define PSC_PSITE_P  0
#define PSC_PTYPE_P  5
#define PSC_PNAME_P 12
#define PSC_ODATA_P 26
#define PSC_TNAME_P 33
#define PSC_TIME_P  46
#define PSC_SKIP_P  65
#define PSC_RQST_P  73
#define PSC_STAT_P  80
#define PSC_RUNS_P  89 


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

/*  Memory allocation for the hot pcf ( which is the highlighed item in the
    list ) and equivalent text, and the corresponding xmstring.
*/

/* Scheduler name */

EXTERN char  spscname_c[80];

EXTERN SFLT         pscfilter_c;
EXTERN UINT4        psc_site_grp_mask_c;

EXTERN int          psc_making_selection_c;
EXTERN int          psc_num_sel_mainlst_c;
EXTERN SPSC_SUM     hotpcfsuma_c[MAX_PSC_SLOTS];
EXTERN SPSC_SUM     pcfsuma_c;   /* pad */
EXTERN char         shotpcfsuma_c[160];
EXTERN int          first_selected_item_pos_c;
EXTERN int          time_is_popped_up_c;


/* PSC */
EXTERN Widget psc_mainbar;
EXTERN Widget psc_filebtn, psc_filepdw;
EXTERN Widget psc_menubtn, psc_menupdw;
EXTERN Widget psc_cmdsbtn, psc_cmdspdw;
EXTERN Widget psc_helpbtn, psc_helppdw;
EXTERN Widget psc_printpdw;
void psc_file_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );
void psc_menu_cbf( Widget wgt_a, int idx_a,  XmPushButtonCallbackStruct* cbd_a );
void psc_cmds_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );

EXTERN XsFLB* psc_open;
void   psc_openlist( char*, UINT4 );   
EXTERN Widget psc_svasbtn, psc_svaspop;
EXTERN Widget pschelp_fnampop;
EXTERN XsFLB* psc_dele;
void   psc_delelist( char *sptr_a, UINT4 ilen_a );   

EXTERN XsFLB* psc_addp;
void psc_addplist( char *sptr_a, UINT4 ilen_a );

EXTERN Widget psc_filtertxt;

EXTERN XsFLB*   psc_sitespop;
EXTERN Widget psc_siteslab, psc_sitesbtn, psc_sitestxt;
void psc_sitesbtn_cbf( Widget wgt, void* idx_a, void* cbd );
void psc_sitepop_cbf( Widget wgt, char* tag, XmListCallbackStruct* cbd );

EXTERN UINT4   psc_site_num_c;
EXTERN XsFLB*  psc_sitesaddpop;
EXTERN Widget psc_sitesaddlab, psc_sitesaddbtn, psc_sitesaddtxt;
void psc_sitesaddbtn_cbf( Widget wgt, void* idx_a, void* cbd );
void psc_sitesaddpop_cbf( Widget wgt, char* tag, XmListCallbackStruct* cbd );

EXTERN XsFLB*   psc_sitegrppop;
EXTERN Widget psc_sitegrplab, psc_sitegrpbtn, psc_sitegrptxt;
void psc_sitegrpbtn_cbf( Widget wgt, void *idx_a, void* cbd );
void psc_sitegrppop_cbf( Widget wgt, char* tag, XmListCallbackStruct* cbd );

EXTERN XsFLB*   psc_sitepop;
EXTERN UINT4  site_mask_c;
void psc_sitelistpop( char *, UINT4 );
void psc_sitespop_cbf( Widget wgt, char* tag, XmListCallbackStruct* cbd );

EXTERN Widget psc_legendlab;
EXTERN Widget psc_mainlst;

EXTERN Widget psc_prodshl, psc_prodpop;
EXTERN Widget psc_pcfipop, psc_pcfilst, psc_pcfiexitbtn;
void psc_mainlst_cbf( Widget wgt,char* tag,XmListCallbackStruct* cbd );
void psc_prodbtn_cbf( Widget wgt_a,int idx_a,XmPushButtonCallbackStruct* cbd_a);


EXTERN Widget psc_nullshl, psc_nullpop;
EXTERN Widget psc_nashl,   psc_napop;
EXTERN Widget psc_headshl, psc_headpop;
EXTERN Widget psc_rqstshl, psc_rqstpop;
EXTERN Widget psc_nextshl, psc_nextpop, psc_nexttxt;
EXTERN Widget psc_skipshl, psc_skippop, psc_skiptxt;
EXTERN Widget psc_dumshl;
void psc_mainlst_focus( Widget wgtbase_a, void *wgtpop_a, XEvent *evt_a, Boolean *lcont );
void psc_postit( Widget wgtbase_a, void* wgtpop_a, XEvent *evt_a, Boolean *lCont_a );
void psc_rqst_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );
void psc_skip_cbf( Widget wgt, char* tag, XmAnyCallbackStruct* cbd );
void psc_next_cbf( Widget wgt, char* tag, XmAnyCallbackStruct* cbd );

void  psc_update_rqst(void);
void  psc_update( char *sptr_a, UINT4 ilen_a );

#undef EXTERN
#endif
