 
#ifndef fad_DEFINED
#define fad_DEFINED 1
 
#ifndef class_DEFINED
#include <class.h>
#endif /* class_DEFINED */
/* 
 * This file was generated by the Andrew class system preprocessor.
 * Don't make changes to this file as it is created from fad.ch and will be
 * overwritten.  Make changes to fad.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from fad.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/


 

#ifndef FAD_DEFS
#define FAD_DEFS
#define fad_NEWFAD 10000
#define OLD 1
#define NEW 0
#define PFUG 4
#define min(a,b) (a < b) ? a:b
#define ICONFLAG -10
#define LABELFLAG -10000
#define ANIMATEFLAG -9999
#define ISICONORLABEL(A) ((A) < 0)
#define ISICON(A) ((A) < 0 && (A) != LABELFLAG)
#define ISICONVEC(V) (ISICON(V->p2->x))
#define MAXWIDTH 20000
#define MAXHEIGHT 20000
#define LINEMODE 0
#define BOXMODE 1
#define ANIMATEMODE 2
#define FRTIME 30 	/* default minimum number of milliseconds between frames */
struct anivect {
	float x1,y1,y2,x2,dx1,dx2,dy1,dy2;
	char *label;
	char mode;
	};
struct fadpoint {
	long x,y;
	struct fadpoint *p;
	};
struct vector {
	struct fadpoint *p1,*p2;
	struct vector *v;
	char *label;
	char stat;
	char mode;
	};
struct fad_frame {
	struct vector *v;
	struct fadpoint *p;
	struct fad_frame *f;
	struct anivect *av;
	};
#endif /* FAD_DEFS */





/* 
 * End of information copied from fad.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
#define dontDefineRoutinesFor_dataobject
#include "dataobj.ih"
#undef dontDefineRoutinesFor_dataobject

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for fad 
 */ 
struct fad { 
    union {
	struct basicobject_methods *fad_methods;
	struct traced traced;
	struct observable observable;
	struct dataobject dataobject;
    } header;
    short ox,oy,w,h,pltnum,desw,desh;
    struct fad_frame *f,*bf,*deleated;
    struct fadpoint *fp,*lp;
    struct vector *veclist[64];
    short  Frames,iconmode,currentfontindex,topinmp ,fad_square,frtime,readonly,initializedfonts ;
    char cfname[128],currentistr[128], currenticon,fadname[256], iconnamebuf[512],*inmp[15],labelfontname[256];
    struct fontdesc *fontpt[15], *currentfont,*labelfont;
    struct fadpoint *iconpoints[200],**iconpointend, **iconpointnow;
    struct cursor *cursor;
    char mode;

};

 
/* 
 * End of data structure for fad.
 */ 
 

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef fad_PROGRAMMERVERSION
#define fad_PROGRAMMERVERSION 1
#endif /* fad_PROGRAMMERVERSION */

#ifdef fad_VERSION
#undef fad_VERSION
#endif /* fad_VERSION */
#define fad_VERSION ((((fad_PROGRAMMERVERSION << 16) ^ (34 << 8) ^ sizeof(struct fad)) & 0x7ffff) + 0x80000 + (1 << 20))


#endif /* class_StaticInfoOnly */
#define fad_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *fad__GetClassInfo(); \
 extern struct classheader *fad_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, fad_classheader_StaticExport->name, fad__GetClassInfo, NULL, fad_classheader_StaticExport->namekey); } 
 
#define fad_StaticLoad()  \
    { \
    dataobject_StaticLoad(); \
    fad_StaticLoadOnlyThisClass();  \
    } 
 
#define fad_StaticEntry  {fad_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader fad_classheader = {
    fad_VERSION,
    "fad",
    "fad",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define fad_CLASSPROCEDURES (fad_classheader.classprocedures)
int fad_classref_;
#endif /* class_StaticInfoOnly */

#endif /* fad_DEFINED */

#if !defined(fad_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_fad) && !defined(class_StaticEntriesOnly)
#define fad_ROUTINESDEFINED

#define fad_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define fad_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define fad_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define fad_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.fad_methods->routines[0]))) (self,observer))
#define fad_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.fad_methods->routines[1]))) (self,observer))
#define fad_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.fad_methods->routines[2]))) (self,observer))
#define fad_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.fad_methods->routines[3]))) (self,value))
#define fad_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.fad_methods->routines[4]))) (self,changed,value))
#define fad_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.fad_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define fad_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.fad_methods->routines[6]))) (self,trigger,rcvr))
#define fad_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.fad_methods->routines[7]))) (self,trigger))
#define fad_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.fad_methods->routines[8]))) (self,trigger))
#define fad_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.fad_methods->routines[9]))) (self,trigger))
#define fad_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.fad_methods->routines[10]))) (self,trigger))
#define fad_Read(self,file,id) \
    ((* ((long (*)())((self)->header.fad_methods->routines[11]))) (self,file,id))
#define fad_Write(self,file,writeid,level) \
    ((* ((long (*)())((self)->header.fad_methods->routines[12]))) (self,file,writeid,level))
#define fad_ReadOtherFormat(self,file,fmt,encoding,description) \
    ((* ((boolean (*)())((self)->header.fad_methods->routines[13]))) (self,file,fmt,encoding,description))
#define fad_WriteOtherFormat(self,file,writeid,level,usagetype,boundary) \
    ((* ((long (*)())((self)->header.fad_methods->routines[14]))) (self,file,writeid,level,usagetype,boundary))
#define fad_GetModified(self) \
    ((* ((long (*)())((self)->header.fad_methods->routines[15]))) (self))
#define fad_SetModified(self) \
    ((* ((void (*)())((self)->header.fad_methods->routines[16]))) (self))
#define fad_ViewName(self) \
    ((* ((char * (*)())((self)->header.fad_methods->routines[17]))) (self))
#define fad_SetAttributes(self,attributes) \
    ((* ((void (*)())((self)->header.fad_methods->routines[18]))) (self,attributes))
#define fad_Put(self,property,type,rock) \
    ((* ((void (*)())((self)->header.fad_methods->routines[19]))) (self,property,type,rock))
#define fad_Get(self,property,type,rock) \
    ((* ((short (*)())((self)->header.fad_methods->routines[20]))) (self,property,type,rock))
#define fad_ListCurrentViews(self,array,size) \
    ((* ((int (*)())((self)->header.fad_methods->routines[21]))) (self,array,size))
#define fad_RestoreModified(self,oldmodified) \
    ((* ((void (*)())((self)->header.fad_methods->routines[22]))) (self,oldmodified))
#define fad_UniqueID(self) \
 ((long)((&(self)->header.dataobject)))
#define fad_GetWriteID(self) \
 ( ((&(self)->header.dataobject))->writeID )
#define fad_SetWriteID(self,newValue) \
 ( (((&(self)->header.dataobject))->writeID) = (newValue) )
#define fad_GetID(self) \
      ( ((&(self)->header.dataobject))->id )
#define fad_SetID(self,newValue) \
      ( (((&(self)->header.dataobject))->id) = (newValue) )
#define fad_newpoint(self,x,y) \
    ((* ((struct fadpoint * (*)())((self)->header.fad_methods->routines[23]))) (self,x,y))
#define fad_newframe(self) \
    ((* ((struct fad_frame * (*)())((self)->header.fad_methods->routines[24]))) (self))
#define fad_SetName(self,name) \
    ((* ((void (*)())((self)->header.fad_methods->routines[25]))) (self,name))
#define fad_setpoint(self,x,y,type,f) \
    ((* ((struct fadpoint * (*)())((self)->header.fad_methods->routines[26]))) (self,x,y,type,f))
#define fad_setvector(self,pp1,pp2,f) \
    ((* ((struct vector * (*)())((self)->header.fad_methods->routines[27]))) (self,pp1,pp2,f))
#define fad_delvector(self,f) \
    ((* ((void (*)())((self)->header.fad_methods->routines[28]))) (self,f))
#define fad_iconnum(self,s) \
    ((* ((short (*)())((self)->header.fad_methods->routines[29]))) (self,s))
#define fad_freeframe(self,ff) \
    ((* ((void (*)())((self)->header.fad_methods->routines[30]))) (self,ff))
#define fad_flipicons(self) \
    ((* ((int (*)())((self)->header.fad_methods->routines[31]))) (self))
#define fad_unflipicons(self) \
    ((* ((int (*)())((self)->header.fad_methods->routines[32]))) (self))
#define fad_SetReadOnly(self,readOnly) \
    ((* ((void (*)())((self)->header.fad_methods->routines[33]))) (self,readOnly))

#define fad_NewFromObject(self) \
    ((* ((struct fad * (*)())((self)->header.fad_methods->info->procs->routines[0]))) (&fad_classheader, (self)->header.fad_methods->info->versionnumber))
#define fad_New() \
    (*((struct fad * (*)()) (fad_CLASSPROCEDURES->routines[0])))(&fad_classheader,fad_VERSION)
#define fad_Initialize(self) \
    (*((void (*)()) (fad_CLASSPROCEDURES->routines[2])))(&fad_classheader,self, fad_VERSION)

#define fad_Destroy(self) \
    ((* ((void (*)()) ((self)->header.fad_methods->info->procs->routines[1]))) (&fad_classheader, self))
#define fad_Finalize(self) \
    (*((void (*)()) (fad_CLASSPROCEDURES->routines[3])))(&fad_classheader,self)

#define fad_InitializeObject(self) \
    (*((boolean (*)()) (fad_CLASSPROCEDURES->routines[5])))(&fad_classheader,self)
#define fad_FinalizeObject(self) \
    (*((void (*)()) (fad_CLASSPROCEDURES->routines[6])))(&fad_classheader,self)


#endif /* !defined(fad_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_fad ) && !defined(class_StaticEntriesOnly)*/

