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

 PVIEW.H    Global variables and functions for PVIEW 

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

#ifdef PVIEW_ALLOCATE
#define EXTERN
#else
#define EXTERN extern
#endif

//#define DEBUG_PRINTF

class PViewParams
{
 public:
  char         fileSelected[100];
  UINT2        isFileSelected;
  void         init(void);
  XtAppContext getAppContext(void);
  Display      *getDisplay(void);
  Screen       *getScreen(void);  /* Also add visual and depth calls */
  UINT4        getScreenNum(void);
  Window       getDrawAreaWindow(void);
  UINT4        getDrawAreaWidth(void);
  UINT4        getDrawAreaHeight(void);
  GC           getCopyGC(void);
  GC           getEraseGC(void);
  GC           getRedGC(void);
  GC           getBlackGC(void);
  GC           getWhiteGC(void);
  Widget       getTopWidget(void);
  Widget       getPViewApplShellWidget(void);
  void         setProdTypeTxtF(char *sptr);
  void         setProdNameTxtF(char *sptr);
  void         setDataTypeTxtF(char *sptr);
  void         setProdTimeTxtF(char *sptr);
  void         setProdDateTxtF(char *sptr);
  void         setProdSizeTxtF(char *sptr);
 private:
  GC           copyGC;
  GC           eraseGC;
  GC           redGC;
  GC           blackGC;
  GC           whiteGC;
  Window       drawAreaWindow;
};
EXTERN PViewParams pViewParams;

class FileSelectTool 
{
  public :
    void create(swidget parent);
    void popup(void);
    void popdown(void);
};
EXTERN FileSelectTool fileSelectTool;


class PViewDraw
{
 public:
  void    DrawNew( const char *sPath_a );
  void    Init(void);
  void    expose(SINT4 ix_a, SINT4 iy_a, SINT4 iw_a, SINT4 ih_a);
 private:
  XImage *pImage;
  UINT4  iVtvToImageMap[256];
  int    iImageDepth;
};
EXTERN PViewDraw pViewDraw;
#ifdef SIGMET_PRODUCT_H
EXTERN struct product_hdr ProdHeader_c;
#endif  /* #ifdef SIGMET_PRODUCT_H */

#undef EXTERN
