 
#ifndef figattr_DEFINED
#define figattr_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 figattr.ch and will be
 * overwritten.  Make changes to figattr.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from figattr.ch.
 */ 
 
/* figattr.ch - attributes for fig objects */
/*
	Copyright Carnegie Mellon University 1992 - All rights reserved
	$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.
* $

  $Header: /afs/cs.cmu.edu/project/atk-dist/6.2/atk/figure/RCS/figattr.ch,v 1.2 1992/12/14 20:45:16 rr2b R6tape $
*/

#define	figattr_MaskAll	    (0x00ff) /* binary 11111111 */
#define figattr_NumAttributes (8)

#define	figattr_Shade	    (0)
#define	figattr_Color	    (1)
#define	figattr_LineWidth   (2)
#define	figattr_RRectCorner (3)
#define	figattr_FontSize    (4)
#define	figattr_FontStyle   (5)
#define	figattr_FontFamily  (6)
#define	figattr_TextPos	    (7)

/* definitions:
Shade: long: value from 0 (white) to 8 (black). -1 means clear. 
LineWidth: long: 0 for hairline (always drawn at 1/72"); positive values for positive widths. The width in fig coords is val*figview_FigUPerPix.
RRectCorner: long: 0 for none; positive values for positive widths. The width in fig coords is val*figview_FigUPerPix.
Color: char *: lowercase string containing an X (or whatever) color name.
TextPos: long: figattr_PosLeft, figattr_PosCenter, figattr_PosRight 
*/

#define figattr_ShadeClear  (-1)
/* denominator for view_GrayPattern() calls */
#define figattr_ShadeDenom  (8)

/* values for the TextPos attribute */
#define	figattr_PosCenter   (0x00)
#define	figattr_PosLeft	    (0x01)
#define	figattr_PosRight    (0x02)
/*  I have no intention of supporting vertical positioning, but if anybody does, here are some values. OR them with the first three to create the TextPos value. Note that old TextPos values will be forwards-compatible.
#define	figattr_PosVCenter  (0x00)
#define	figattr_PosTop	    (0x10)
#define	figattr_PosBottom   (0x20)
*/






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

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for figattr 
 */ 
struct figattr { 
    union {
	struct basicobject_methods *figattr_methods;
	struct traced traced;
	struct observable observable;
	struct dataobject dataobject;
    } header;
      unsigned long active;  /* bits as defined above */

      long shade; 
      long linewidth;
      char *color;
      long rrectcorner;
      long fontsize;
      long fontstyle;
      char *fontfamily;
      long textpos;

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef figattr_PROGRAMMERVERSION
#define figattr_PROGRAMMERVERSION 1
#endif /* figattr_PROGRAMMERVERSION */

#ifdef figattr_VERSION
#undef figattr_VERSION
#endif /* figattr_VERSION */
#define figattr_VERSION ((((figattr_PROGRAMMERVERSION << 16) ^ (25 << 8) ^ sizeof(struct figattr)) & 0x7ffff) + 0x80000 + (1 << 20))


#endif /* class_StaticInfoOnly */
#define figattr_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *figattr__GetClassInfo(); \
 extern struct classheader *figattr_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, figattr_classheader_StaticExport->name, figattr__GetClassInfo, NULL, figattr_classheader_StaticExport->namekey); } 
 
#define figattr_StaticLoad()  \
    { \
    dataobject_StaticLoad(); \
    figattr_StaticLoadOnlyThisClass();  \
    } 
 
#define figattr_StaticEntry  {figattr_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader figattr_classheader = {
    figattr_VERSION,
    "figattr",
    "figattr",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define figattr_CLASSPROCEDURES (figattr_classheader.classprocedures)
int figattr_classref_;
#endif /* class_StaticInfoOnly */

#endif /* figattr_DEFINED */

#if !defined(figattr_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_figattr) && !defined(class_StaticEntriesOnly)
#define figattr_ROUTINESDEFINED

#define figattr_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define figattr_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define figattr_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define figattr_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[0]))) (self,observer))
#define figattr_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.figattr_methods->routines[1]))) (self,observer))
#define figattr_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[2]))) (self,observer))
#define figattr_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[3]))) (self,value))
#define figattr_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[4]))) (self,changed,value))
#define figattr_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.figattr_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define figattr_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[6]))) (self,trigger,rcvr))
#define figattr_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[7]))) (self,trigger))
#define figattr_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[8]))) (self,trigger))
#define figattr_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[9]))) (self,trigger))
#define figattr_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.figattr_methods->routines[10]))) (self,trigger))
#define figattr_Read(self,file,id) \
    ((* ((long (*)())((self)->header.figattr_methods->routines[11]))) (self,file,id))
#define figattr_Write(self,file,writeid,level) \
    ((* ((long (*)())((self)->header.figattr_methods->routines[12]))) (self,file,writeid,level))
#define figattr_ReadOtherFormat(self,file,fmt,encoding,description) \
    ((* ((boolean (*)())((self)->header.figattr_methods->routines[13]))) (self,file,fmt,encoding,description))
#define figattr_WriteOtherFormat(self,file,writeid,level,usagetype,boundary) \
    ((* ((long (*)())((self)->header.figattr_methods->routines[14]))) (self,file,writeid,level,usagetype,boundary))
#define figattr_GetModified(self) \
    ((* ((long (*)())((self)->header.figattr_methods->routines[15]))) (self))
#define figattr_SetModified(self) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[16]))) (self))
#define figattr_ViewName(self) \
    ((* ((char * (*)())((self)->header.figattr_methods->routines[17]))) (self))
#define figattr_SetAttributes(self,attributes) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[18]))) (self,attributes))
#define figattr_Put(self,property,type,rock) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[19]))) (self,property,type,rock))
#define figattr_Get(self,property,type,rock) \
    ((* ((short (*)())((self)->header.figattr_methods->routines[20]))) (self,property,type,rock))
#define figattr_ListCurrentViews(self,array,size) \
    ((* ((int (*)())((self)->header.figattr_methods->routines[21]))) (self,array,size))
#define figattr_RestoreModified(self,oldmodified) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[22]))) (self,oldmodified))
#define figattr_UniqueID(self) \
 ((long)((&(self)->header.dataobject)))
#define figattr_GetWriteID(self) \
 ( ((&(self)->header.dataobject))->writeID )
#define figattr_SetWriteID(self,newValue) \
 ( (((&(self)->header.dataobject))->writeID) = (newValue) )
#define figattr_GetID(self) \
      ( ((&(self)->header.dataobject))->id )
#define figattr_SetID(self,newValue) \
      ( (((&(self)->header.dataobject))->id) = (newValue) )
#define figattr_CopySelf(self) \
    ((* ((struct figattr * (*)())((self)->header.figattr_methods->routines[23]))) (self))
#define figattr_CopyData(self,src,mask) \
    ((* ((void (*)())((self)->header.figattr_methods->routines[24]))) (self,src,mask))
#define figattr_SetActive(self,att,val) \
  (((self))->active = ((val) ? (((self))->active | ((unsigned long)1<<(att))) : (((self))->active & ~((unsigned long)1<<(att)))))
#define figattr_IsActive(self,att) \
	(((self))->active & ((unsigned long)1<<(att)))
#define figattr_SetShadeVal(self,val) \
  (((self))->shade = (val))
#define figattr_GetShadeVal(self) \
  (((self))->shade)
#define figattr_SetShade(self,val) \
  (((self))->shade = (val), ((self))->active |= ((unsigned long)1<<figattr_Shade))
#define figattr_GetShade(self,def) \
  (figattr_IsActive(((self)), figattr_Shade) ? (((self))->shade) : ((def)->shade))
#define figattr_SetLineWidthVal(self,val) \
  (((self))->linewidth = (val))
#define figattr_GetLineWidthVal(self) \
  (((self))->linewidth)
#define figattr_SetLineWidth(self,val) \
  (((self))->linewidth = (val), ((self))->active |= ((unsigned long)1<<figattr_LineWidth))
#define figattr_GetLineWidth(self,def) \
  (figattr_IsActive(((self)), figattr_LineWidth) ? (((self))->linewidth) : ((def)->linewidth))
#define figattr_SetRRectCornerVal(self,val) \
  (((self))->rrectcorner = (val))
#define figattr_GetRRectCornerVal(self) \
  (((self))->rrectcorner)
#define figattr_SetRRectCorner(self,val) \
  (((self))->rrectcorner = (val), ((self))->active |= ((unsigned long)1<<figattr_RRectCorner))
#define figattr_GetRRectCorner(self,def) \
  (figattr_IsActive(((self)), figattr_RRectCorner) ? (((self))->rrectcorner) : ((def)->rrectcorner))
#define figattr_SetColorVal(self,val) \
  ((((self))->color ? (free(((self))->color), 1) : 0), ((self))->color = (char *)malloc(1+strlen(val)), strcpy(((self))->color, (val)))
#define figattr_GetColorVal(self) \
  (((self))->color)
#define figattr_SetColor(self,val) \
  (figattr_SetColorVal((self), val), ((self))->active |= ((unsigned long)1<<figattr_Color))
#define figattr_GetColor(self,def) \
  (figattr_IsActive(((self)), figattr_Color) ? (((self))->color) : ((def)->color))
#define figattr_SetFontFamilyVal(self,val) \
  ((((self))->fontfamily ? (free(((self))->fontfamily), 1) : 0), ((self))->fontfamily = (char *)malloc(1+strlen(val)), strcpy(((self))->fontfamily, (val)))
#define figattr_GetFontFamilyVal(self) \
  (((self))->fontfamily)
#define figattr_SetFontFamily(self,val) \
  (figattr_SetFontFamilyVal((self), val), ((self))->active |= ((unsigned long)1<<figattr_FontFamily))
#define figattr_GetFontFamily(self,def) \
  (figattr_IsActive(((self)), figattr_FontFamily) ? (((self))->fontfamily) : ((def)->fontfamily))
#define figattr_SetFontSizeVal(self,val) \
  (((self))->fontsize = (val))
#define figattr_GetFontSizeVal(self) \
  (((self))->fontsize)
#define figattr_SetFontSize(self,val) \
  (((self))->fontsize = (val), ((self))->active |= ((unsigned long)1<<figattr_FontSize))
#define figattr_GetFontSize(self,def) \
  (figattr_IsActive(((self)), figattr_FontSize) ? (((self))->fontsize) : ((def)->fontsize))
#define figattr_SetFontStyleVal(self,val) \
  (((self))->fontstyle = (val))
#define figattr_GetFontStyleVal(self) \
  (((self))->fontstyle)
#define figattr_SetFontStyle(self,val) \
  (((self))->fontstyle = (val), ((self))->active |= ((unsigned long)1<<figattr_FontStyle))
#define figattr_GetFontStyle(self,def) \
  (figattr_IsActive(((self)), figattr_FontStyle) ? (((self))->fontstyle) : ((def)->fontstyle))
#define figattr_SetTextPosVal(self,val) \
  (((self))->textpos = (val))
#define figattr_GetTextPosVal(self) \
  (((self))->textpos)
#define figattr_SetTextPos(self,val) \
  (((self))->textpos = (val), ((self))->active |= ((unsigned long)1<<figattr_TextPos))
#define figattr_GetTextPos(self,def) \
  (figattr_IsActive(((self)), figattr_TextPos) ? (((self))->textpos) : ((def)->textpos))

#define figattr_NewFromObject(self) \
    ((* ((struct figattr * (*)())((self)->header.figattr_methods->info->procs->routines[0]))) (&figattr_classheader, (self)->header.figattr_methods->info->versionnumber))
#define figattr_New() \
    (*((struct figattr * (*)()) (figattr_CLASSPROCEDURES->routines[0])))(&figattr_classheader,figattr_VERSION)
#define figattr_Initialize(self) \
    (*((void (*)()) (figattr_CLASSPROCEDURES->routines[2])))(&figattr_classheader,self, figattr_VERSION)

#define figattr_Destroy(self) \
    ((* ((void (*)()) ((self)->header.figattr_methods->info->procs->routines[1]))) (&figattr_classheader, self))
#define figattr_Finalize(self) \
    (*((void (*)()) (figattr_CLASSPROCEDURES->routines[3])))(&figattr_classheader,self)

#define figattr_InitializeObject(self) \
    (*((boolean (*)()) (figattr_CLASSPROCEDURES->routines[5])))(&figattr_classheader,self)
#define figattr_FinalizeObject(self) \
    (*((void (*)()) (figattr_CLASSPROCEDURES->routines[6])))(&figattr_classheader,self)


#endif /* !defined(figattr_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_figattr ) && !defined(class_StaticEntriesOnly)*/

