/* **********************************************************************
 * *                                                                    *
 * *  Ingest Summary Menu header file                                   *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xuif/ism.h
 *
 *                  COPYRIGHT (c) 2000, 2002, 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.
 */

#ifdef ISM_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif



/* Ingest list X offset for various sub fields */
#define ISMTAGS_X_P  0
#define ISMSITE_X_P  4
#define ISMNAME_X_P 10 
#define ISMSCAN_X_P 23
#define ISMRANG_X_P 28 
#define ISMDATA_X_P 35
#define ISMSWPS_X_P 53
#define ISMTIME_X_P 58
#define ISMSIZE_X_P 79 

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

/* Selected entry of ingest list. Force including in declaration file.
 * This is mainly a defense against pruneincs. */
#if defined(SIGMET_INGEST_H) || defined(ISM_ALLOCATE)
EXTERN SIHD_SUM  arrismhotentry_c[MAX_INGEST_FILES];
#endif
EXTERN int          ism_num_sel_ismlst_c;
EXTERN int          ism_making_selection_c;


EXTERN Widget ism_mainbar;
EXTERN Widget ism_cmdsbtn, ism_cmdspdw;
EXTERN Widget ism_filebtn, ism_filepdw;
EXTERN Widget ism_menubtn, ism_menupdw;
EXTERN Widget ism_helpbtn, ism_helppdw;
EXTERN Widget ism_printpdw;
void   ism_file_cbf(Widget wgt, int index, XmPushButtonCallbackStruct *cbd );
void   ism_menu_cbf(Widget wgt, int index, XmPushButtonCallbackStruct *cbd );


/* List Filter */
EXTERN SLST_HDR  ismlsthdr_c;
EXTERN SFLT      ismfilter_c;
EXTERN Widget    ism_filtertxt;

EXTERN Widget    ism_flgndlab;         /* Line one */
EXTERN XsPDW_TXT ism_fsite;
void ism_fsitepdw_cbf( Widget wgt_a, void *indx, void* cbd_a );
void ism_fsitetxt_cbf( Widget wgt, void* tag, void* cbd );


EXTERN Widget    ism_ftasktxt;
void      ism_ftasktxt_cbf(Widget wgt, char *tag, XmAnyCallbackStruct *cbd );

EXTERN XsPDW_TXT ism_ftype;
void ism_ftypepdw_cbf( Widget wgt_a, void *, void* cbd_a );
void ism_ftypetxt_cbf( Widget wgt, void* tag, void* cbd );

EXTERN XsPDW_TXT ism_fhour;
void ism_fhourpdw_cbf( Widget wgt_a, void * idx_a, void* cbd_a );
void ism_fhourfromtxt_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget    ism_fhourtotxt;
void ism_fhourtotxt_cbf( Widget wgt, void* tag, void* cbd );

EXTERN XsPDW_TXT ism_fday;
void ism_fdaypdw_cbf( Widget wgt_a, void *idx_a, void* cbd_a );
void ism_fdaytxt_cbf( Widget wgt, void* tag, void* cbd );
EXTERN XsPDW_TXT ism_fmon;
void ism_fmonpdw_cbf( Widget wgt_a, int idx_a, XmAnyCallbackStruct* cbd_a );
EXTERN XsPDW_TXT ism_fyear;
void ism_fyearpdw_cbf( Widget wgt_a, void *idx_a, void* cbd_a );
void ism_fyeartxt_cbf( Widget wgt,void* tag, void* cbd );

EXTERN XsPDW_TXT ism_fmax;
void ism_fmaxpdw_cbf( Widget wgt_a, void *idx_a, void* cbd_a );
void ism_fmaxtxt_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget    ism_ffilelab;

EXTERN Widget    ism_fgrabbtn;         /* Line two */
void ism_fgrabbtn_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget    ism_fapplybtn;
void ism_fapplybtn_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget    ism_fwildbtn;
void ism_fwildbtn_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget    ism_ftimebtn,  ism_ftimebtns[4];
void ism_ftimebtn_cbf( Widget wgt, void* tag, void* cbd );
EXTERN Widget ism_fcmdsbar, ism_fcmdsbtn, ism_fcmdspdw;
void ism_fcmdspdw_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );
EXTERN int ism_fcmds_idx_c;

EXTERN Widget ism_legendlab;
EXTERN Widget ism_mainlst;
EXTERN Widget ism_tagshl;
EXTERN Widget ism_nullshl, ism_nullpop;
void   ism_mainlst_cbf( Widget wgt,char* tag,XmListCallbackStruct* cbd );
void   ism_postit( Widget wbase_a, Widget wpop_a, XButtonPressedEvent *evt_a );
void   ism_button_release( Widget wbase_a, Widget wpop_a, XButtonReleasedEvent *evt_a );
void   ism_update( char *sptr_a, UINT4 ilen_a );
void   ism_update_rqst(void);
void   ism_tagbtn_cbf(Widget wgt, int index, XmPushButtonCallbackStruct *cbd );
SINT2  istr_to_scanid_f( char* scan_a );

void   ism_cmds_cbf(Widget wgt, int index, XmPushButtonCallbackStruct *cbd );

#undef EXTERN
