/*
 * **************************
 * *                        *
 * *  MSG menu header file  *
 * *                        *
 * **************************
 */
#ifndef MSG_H
#define MSG_H

#ifdef MSG_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif


struct msg_update
{
  struct server_list_header hdr;
  struct server_message_entry list[2];
};

/* Function prototypes */
void msg_index
  (struct msg_update *msg_a,
   SINT4 isize_a );

void msg_init
  (struct msg_update *msg_a,
   SINT4 isize_a );

void msg_update
  (struct msg_update *msg_a,
   SINT4 isize_a );


/*=============================================================================*/
/* Ingest list X offset for various sub fields */
#define MSGINDEX_X_POS (0)
#define MSGTIME_X_POS  (6)
#define MSGTEXT_X_POS  (25)
#define MSGEND_X_POS  (127)

EXTERN Widget msg_mainbar;
EXTERN Widget msg_cmdsbtn, msg_cmdspdw;
EXTERN Widget msg_filebtn, msg_filepdw;
void msg_file_cbf( Widget wgt, int idx_a, XmPushButtonCallbackStruct* cbd );
EXTERN Widget msg_menubtn, msg_menupdw;
void msg_menu_cbf( Widget wgt, int idx_a, XmPushButtonCallbackStruct* cbd );
EXTERN Widget msg_helpbtn, msg_helppdw;
EXTERN Widget msg_printpdw;


/* Pointer to structure holding array of message information currently displayed */
EXTERN struct msg_update *pmessages_c;

EXTERN Widget    msg_index_lab, msg_index_txt;
EXTERN Widget    msg_repeat_lab, msg_repeat_txt;
EXTERN Widget    msg_time_lab, msg_time_txt;
EXTERN Widget    msg_msg_lab, msg_msg_txt;
EXTERN Widget    msg_signal_lab, msg_signal_txt;
EXTERN Widget    msg_process_lab, msg_process_txt;

EXTERN Widget msg_legendlab;
EXTERN Widget msg_mainlst;

/* Function prototypes */

void   msg_mainlst_cbf( Widget wgt,char* tag,XmListCallbackStruct* cbd );
void   msg_update_rqst(void);

void msg_cmds_cbf( Widget wgt_a, int idx_a, XmPushButtonCallbackStruct* cbd_a );

#undef EXTERN
#endif
