/* **********************************************************************
 * *                                                                    *
 * *   Projection menu header file                                      *
 * *                                                                    *
 * **********************************************************************
 * File: iris/xuif/prj.h
 *
 *                  COPYRIGHT (c) 2000, 2001, 2002  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 PRJ_H
#define PRJ_H

#ifdef PRJ_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif

/*-----------------------------------------------------------------------------
Variables
*/
#define LXY0_LOCKED  0
#define LXY1_LOCKED  1
#define LXY2_LOCKED  2

#define LXY0_INPUT   0
#define LXY1_INPUT   1
#define LXY2_INPUT   2
#define DE_INPUT     3
#define DN_INPUT     4
#define REF_INPUT    5


#define LXY_DE_DN_CHG  0
#define X_PIX_CHG      1
#define Y_PIX_CHG      2

EXTERN struct projection_configuration prj_c;
EXTERN struct mpj_projection8          mpj_prj_c;
EXTERN struct mpj_region8              mpj_region_c;
EXTERN UINT1                           lxy_locked_c;
EXTERN UINT1                           linput_c;
EXTERN char                            sprjname_c[80];


/*-----------------------------------------------------------------------------
Widgets & Callbacks 
*/

EXTERN Widget prj_mainbar;

EXTERN Widget prj_filebtn, prj_filepdw;
void   prj_file_cbf();
EXTERN XsFLB* prj_open;
void   prj_openflb_cbf();
void   prj_openlist( char *sptr_a, UINT4 ilen_a );
EXTERN Widget prj_svaspop, prj_svashelppop;
void   prj_svasbtn_cbf();
void   prj_svaspop_ok_cbf();
void   prj_svaspop_help_cbf();
EXTERN Widget prjhelp_fnampop;
EXTERN XsFLB* prj_dele;
void   prj_deleflb_cbf();
void   prj_delelist( char *sptr_a, UINT4 ilen_a );

EXTERN Widget prj_printpdw;

void   prj_update_def_rqst(void);
void   prj_update_all_serv(const char *sptr_a, UINT4 insize_a );
void   prj_update_projection_type(void);


#ifdef SIGMET_PROJECTION_H
EXTERN Widget prj_typebtns[MAPROJ_COUNT];
#endif  /* #ifdef SIGMET_PROJECTION_H */

EXTERN Widget prj_typelab,  prj_typeopt;
EXTERN Widget prj_defaultbtn;
EXTERN Widget prj_ypixlab,  prj_ypixtxt;
EXTERN Widget prj_piximagfrm;
EXTERN Widget prj_xpixlab,  prj_xpixtxt;


void prj_type_cbf( Widget wgt_a,int idx_a, XmPushButtonCallbackStruct* cbd_a);
void prj_defaultbtn_cbf();
void prj_xypixtxt_cbf( );

/* Widget inside form */

EXTERN Widget prj_piximagfrm1;
EXTERN Widget prj_fix0lab, prj_fix0tgl;
EXTERN Widget prj_fix1lab, prj_fix1tgl;
EXTERN Widget prj_fix2lab, prj_fix2tgl;
EXTERN Widget prj_piximaglab;
EXTERN Widget prj_yrnglab, prj_yrngtxt;
EXTERN Widget prj_xrnglab, prj_xrngtxt;

void prj_fixtgl_cbf();
void prj_xyrngtxt_cbf();


/* lon lat stuff*/
EXTERN Widget prj_reflab;
EXTERN Widget prj_latreflab,  prj_latreftxt, prj_latlonrefbtn;
EXTERN Widget prj_lonreflab,  prj_lonreftxt;
EXTERN Widget prj_lat0lab,  prj_lat0txt, prj_latlon0btn;
EXTERN Widget prj_lon0lab,  prj_lon0txt;
EXTERN Widget prj_lat1lab,  prj_lat1txt, prj_latlon1btn;
EXTERN Widget prj_lon1lab,  prj_lon1txt;
EXTERN Widget prj_lat2lab,  prj_lat2txt, prj_latlon2btn;
EXTERN Widget prj_lon2lab,  prj_lon2txt;
void prj_latlonbtn_cbf( );

EXTERN Widget prj_latlonpop, prj_latlonfrm;
EXTERN Widget prj_latlab, prj_lattxt;
EXTERN Widget prj_lonlab, prj_lontxt;
void prj_latlonpopok_cbf( );
void prj_latlontxt_cbf( );


#undef EXTERN
#endif
