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

  PSM POM header file

=============================================================================*/
#ifndef POM_H
#define POM_H

#ifdef POM_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif


/*-----------------------------------------------------------------------------
  POM 
*/
#define POMTAG_X_P    0
#define POMSITE_X_P   3
#define POMTYPE_X_P   7
#define POMNAME_X_P  13
#define POMPARM_X_P  26
#define POMTASK_X_P  54
#define POMTIME_X_P  67
#define POMRQST_X_P  90

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

EXTERN int          pom_num_sel_prodlst_c; 
EXTERN int          pom_has_all_raw_c;
EXTERN int          pom_making_selection_c;
EXTERN SPHD_SUM     arrhotprodsuma_c[MAX_SCROLL_SIZE];

EXTERN SOUT_OPT     pomoptions_c;


EXTERN Widget pom_mainbar;

EXTERN char   spomname_c[17];
EXTERN Widget pom_filebtn, pom_filepdw;
void   pom_file_cbf();   
EXTERN XsFLB* pom_open;
void   pom_openflb_cbf();   
EXTERN Widget pom_svaspop, pom_svashelppop;
void   pom_svasbtn_cbf();
void   pom_svaspop_ok_cbf();   
void   pom_svaspop_help_cbf();   
EXTERN XsFLB* pom_dele;
void   pom_deleflb_cbf();   



EXTERN Widget pom_cmdsbtn, pom_cmdspdw;
void   pom_cmds_cbf();   

EXTERN Widget pom_devsbtn, pom_devspdw;
void   pom_devs_cbf();   

EXTERN Widget pom_menubtn, pom_menupdw;
void   pom_menu_cbf();   

EXTERN Widget pom_helpbtn, pom_helppdw;

EXTERN Widget pom_printpdw;

EXTERN Widget    pom_showtgl;
void      pom_showtgl_cbf();

EXTERN Widget pom_showopt, pom_showbtns[4];
void      pom_showopt_cbf();

/* OVERLAY */

EXTERN Widget pom_overbtn;
void      pom_over_cbf();

EXTERN Widget pom_overnameopt, pom_overnamebtns[8];
void      pom_overnameopt_cbf();

EXTERN Widget pom_outoptbtn, pom_colorbtn;
void      pom_outoptbtn_cbf();
void      pom_colorbtn_cbf();


/* List Filter */
EXTERN struct pom_list_header pomlsthdr_c;
EXTERN SFLT      pomfilter_c;
EXTERN Widget    pom_filtertxt;

EXTERN Widget    pom_flgndlab;         /* Line one */


EXTERN XsPDW_TXT pom_fsite;
void      pom_fsitepdw_cbf();
void      pom_fsitetxt_cbf();

EXTERN XsPDW_TXT pom_ftype;
void      pom_ftypepdw_cbf();
void      pom_ftypetxt_cbf();

EXTERN Widget    pom_fprodtxt;
void      pom_fprodtxt_cbf();
EXTERN Widget    pom_ftasktxt;
void      pom_ftasktxt_cbf();

EXTERN XsPDW_TXT pom_fhour;
void      pom_fhourpdw_cbf();
void      pom_fhourfromtxt_cbf();
EXTERN Widget    pom_fhourtotxt;
void      pom_fhourtotxt_cbf();

EXTERN XsPDW_TXT pom_fday;
void      pom_fdaypdw_cbf();
void      pom_fdaytxt_cbf();
EXTERN XsPDW_TXT pom_fmon;
void      pom_fmonpdw_cbf();
void      pom_fmontxt_cbf();
EXTERN XsPDW_TXT pom_fyear;
void      pom_fyearpdw_cbf();
void      pom_fyeartxt_cbf();

EXTERN XsPDW_TXT pom_fmax;
void      pom_fmaxpdw_cbf();
void      pom_fmaxtxt_cbf();
EXTERN Widget    pom_ffilelab;

EXTERN Widget    pom_fgrabbtn;         /* Line two */
void      pom_fgrabbtn_cbf();
EXTERN Widget    pom_fapplybtn;
void      pom_fapplybtn_cbf();
EXTERN Widget    pom_fwildbtn;
void      pom_fwildbtn_cbf(Widget wgt, char *tag, XmAnyCallbackStruct *cbd);
EXTERN Widget    pom_ftimebtn,  pom_ftimebtns[4];
void      pom_ftimebtn_cbf();

EXTERN Widget pom_fcmdsbar, pom_fcmdsbtn, pom_fcmdspdw;
void      pom_fcmdspdw_cbf();
EXTERN int pom_fcmds_idx_c;


EXTERN Widget pom_legendlab;
EXTERN Widget pom_prodslst;
void   pom_postit();
void   pom_prodlst_focus();
void   pom_prodlst_cbf();
void   StrToPOMEntry( char str_a[], SPHD_SUM* suma_a );
EXTERN char*  spom_suma_txt_f( SPHD_SUM* pomentry_a );

EXTERN Widget pom_quickshl;
void   pom_quick_cbf();
EXTERN Widget pom_keepshl, pom_clutbtn, pom_reinbtn;
void   pom_keep_cbf();
EXTERN Widget pom_sendshl;
void   pom_send_cbf();
EXTERN Widget pom_nullshl;

EXTERN Widget   pom_dumshl;
EXTERN XsFLB*   pom_rqst;
void     pom_rqst_cbf();

void   pom_delelist( char *sptr_a, UINT4 ilen_a );
void   pom_openlist( char *sptr_a, UINT4 ilen_a );
void   pom_options( char *sptr_a, UINT4 ilen_a );
void   pom_poverlist( char *sptr_a, UINT4 ilen_a );
void   pom_typelist( char *sptr_a, UINT4 ilen_a );
void   pom_update_rqst( void );
void   pom_update( struct pom_list *pdata_a, UINT4 ilen_a );


/*-----------------------------------------------------------------------------
   Shared routines 
*/
char* sprod_rqst_f( SINT2 irqst_a );
SINT2 iprod_rqst_f( char* srqst_a );
SINT2 iprod_tag_f( char* stag_a );


#define SMSG_DELEDEFLO "\
The DEFAULT POM can not be deleted."

#undef EXTERN
#endif
