/**********************************************************************
 * xtechinfo.h -- header file for xtechinfo
 *
 * $Author: brlewis $
 * $Source: /afs/sipb/project/sipb-athena/techinfo/xtechinfo/RCS/xtechinfo.h,v $
 * $Header: /afs/sipb/project/sipb-athena/techinfo/xtechinfo/RCS/xtechinfo.h,v 3.9 1995/03/28 19:16:25 brlewis Exp yoav $
 *
 * Copyright 1992 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file
 * "mit-copyright.h".
 **********************************************************************/
#include "mit-copyright.h"

#ifndef _XTECHINFO_H
#define _XTECHINFO_H

#include <Xm/Xm.h>
#include <ti/ti.h>
#include <stdarg.h>

/* * * * * *  LIKELY TO BE CHANGED * * * * * * * */
#define MAXMENUS 32
#define XTECHINFO_VERSION "4.2"
#define XTECHINFO_CLASS "Xtechinfo"
#define XTECHINFO_TITLE "X TechInfo"
#define DEFAULT_SEARCH TI_TFIND

#define GIFVIEWPATH "/afs/athena/contrib/graphics/arch/@sys/bin/xv"
#define GIFVIEWNAME "xv"
#define HTMLVIEWPATH "/afs/sipb.mit.edu/project/sipb/arch/@sys/bin/Mosaic"
#define HTMLVIEWNAME "Mosaic"
#define HTMLPREP "attach -q -n sipb"
#define SENDMAIL "/usr/lib/sendmail -t"
/* * * * * * * * * * * * * * * * * * * * * * * * */

typedef struct _GlobalMenus
{
  TI *tp;
  ti_menu *menus[MAXMENUS];
  short current, count;
  ti_node **nodes;
  int nodecount;
  char *server, *port;
  Bool am_provider;
  long parent;
  ti_node *to_modify;
  long to_remove, to_paste;
  int selected[MAXMENUS];
  int topvisible[MAXMENUS];
  Widget menutitles[MAXMENUS];
} GlobalMenus;

typedef struct _GlobalWidgets
{
  Widget mainlist, mainlabel, text, textshell, infoIcon, infoLabel,
    infoText, keywordInput, keywordMain, keywordCurrent, mainform,
    messageBox, appshell, printInput, printPages, printPrint, textTitle,
    buttonPrev, itemPrev, itemDefine, defTitle, defKeywords, defSource,
    defLocker, defFile, defDocument, defFolder, defLabel, modTitle,
    modKeywords, modSource, modLocker, modFile, modDocument, modFolder,
    removeBox, Cut, Paste, sourceShort, sourceLong, sourceContact,
    sourcePhone, sourceEmail, modGIF, defGIF, mainDate, mainCount,
    textPages, textDate, itemOutl, itemPath, itemWwide, textFind,
    prefKrb, prefSearch, prefDate, prefSource, prefNormal, prefOutline,
    historyMenu, mainHistory, commentText, provSource, provUser,
    provPasswd;
} GlobalWidgets;

typedef struct _Intl{
  char *str01, *str02, *str03, *str04, *str05;
  char *str06, *str07, *str08, *str09, *str10;
  char *str11, *str12, *str13, *str14, *str15;
  char *str16, *str17, *str18, *str19, *str20;
  char *str21, *str22, *str23, *str24, *str25;
  char *str26, *str27, *str28, *str29, *str30;
  char *str31, *str32, *str33, *str34, *str35;
  char *str36, *str37, *str38, *str39, *str40;
  char *str41, *str42, *str43, *str44, *str45;
  char *str46, *str47, *str48, *str49, *str50;
} Intl, *IntlPtr, **IntlHdl;

typedef struct _XTechInfoResources {
  char *server;
  char *port;
  char *helpdir;
  Boolean kerberos;
  Boolean frommain;
  Boolean showdate, showsource;
  int ndepth, odepth;
  char *str01, *str02, *str03, *str04, *str05;
  char *str06, *str07, *str08, *str09, *str10;
  char *str11, *str12, *str13, *str14, *str15;
  char *str16, *str17, *str18, *str19, *str20;
  char *str21, *str22, *str23, *str24, *str25;
  char *str26, *str27, *str28, *str29, *str30;
  char *str31, *str32, *str33, *str34, *str35;
  char *str36, *str37, *str38, *str39, *str40;
  char *str41, *str42, *str43, *str44, *str45;
  char *str46, *str47, *str48, *str49, *str50;
} XTechInfoResources;

extern GlobalMenus global;
extern GlobalWidgets glow;
extern XTechInfoResources GlobalResources;

#define CurrentSelection	(global.selected[global.current])
#define CurrentTopVisible	(global.topvisible[global.current])
#define CurrentMenu		(global.menus[global.current])
#define CurrentTI		(CurrentMenu->tp)
#define CurrentButton		(global.menutitles[global.current])
#define PreviousMenu		(global.menus[global.current-1])
#define PreviousTI		(PreviousMenu->tp)

/* Symbol font stuff */
#define TECHINFO_SYMBOL_FONT "techinfo"
#define SYMBOL_DOC "|"
#define SYMBOL_FOLDER "*"
#define SYMBOL_GIF "+"
#define SYMBOL_LINK "%"
#define SYMBOL_PHONE "("
#define SYMBOL_HTML "H"
#define SYMBOL_VIDEO "V"
#define SYMBOL_AUDIO ")"
#define SYMBOL_MAC "A"
#define SYMBOL_DOS "W"
#define SYMBOL_OTHER "F"

/* function prototypes */
#include "ptypes.h"

#endif /* _XTECHINFO_H */
