 
#ifndef label_DEFINED
#define label_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 label.ch and will be
 * overwritten.  Make changes to label.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from label.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.
* $
*/


 

/*
label.H

	label data object

	stores the font and text string for labelview

	The file format for a label has multiple lines between the lines for
	\begindata and \enddata.  The first line has a font specification consisting
	of familyname, style(as a long value), and size.  
	Subsequent lines are the text to be displayed.
	The text is truncated to be no more than 255 characters 
		and backslashes and curly braces are removed.
	The default font is andy10b.
	If there is no text, the self->text field is NULL.  (strlen(self->text) is never 0)

*/

#define  label_PROGRAMMERVERSION    1

/* status values for NotifyObservers */
#define label_DATACHANGED 1

#include <graphic.ih>

/* values for various attributes */

#define	label_NOJUST		graphic_NOMOVEMENT
#define	label_LEFTJUST		graphic_ATLEFT
#define	label_RIGHTJUST		graphic_ATRIGHT
#define	label_HCENTERJUST	graphic_BETWEENLEFTANDRIGHT
#define	label_TOPJUST		graphic_ATTOP
#define	label_BOTTOMJUST	graphic_ATBOTTOM
#define	label_VCENTERJUST	graphic_BETWEENTOPANDBOTTOM
#define	label_CENTERED		label_HCENTERJUST | label_VCENTERJUST

#define	label_BOXED		0x80








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

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for label 
 */ 
struct label { 
    union {
	struct basicobject_methods *label_methods;
	struct traced traced;
	struct observable observable;
	struct dataobject dataobject;
    } header;

	char *text;	/* the text itself */
	int flags;		/* justification and whether boxed, as per above */
	struct fontdesc *font;	/* the font */

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef label_PROGRAMMERVERSION
#define label_PROGRAMMERVERSION 1
#endif /* label_PROGRAMMERVERSION */

#ifdef label_VERSION
#undef label_VERSION
#endif /* label_VERSION */
#define label_VERSION ((((label_PROGRAMMERVERSION << 16) ^ (28 << 8) ^ sizeof(struct label)) & 0x7ffff) + 0x80000 + (1 << 20))


#endif /* class_StaticInfoOnly */
#define label_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *label__GetClassInfo(); \
 extern struct classheader *label_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, label_classheader_StaticExport->name, label__GetClassInfo, NULL, label_classheader_StaticExport->namekey); } 
 
#define label_StaticLoad()  \
    { \
    dataobject_StaticLoad(); \
    label_StaticLoadOnlyThisClass();  \
    } 
 
#define label_StaticEntry  {label_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader label_classheader = {
    label_VERSION,
    "label",
    "label",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define label_CLASSPROCEDURES (label_classheader.classprocedures)
int label_classref_;
#endif /* class_StaticInfoOnly */

#endif /* label_DEFINED */

#if !defined(label_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_label) && !defined(class_StaticEntriesOnly)
#define label_ROUTINESDEFINED

#define label_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define label_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define label_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define label_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.label_methods->routines[0]))) (self,observer))
#define label_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.label_methods->routines[1]))) (self,observer))
#define label_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.label_methods->routines[2]))) (self,observer))
#define label_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.label_methods->routines[3]))) (self,value))
#define label_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.label_methods->routines[4]))) (self,changed,value))
#define label_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.label_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define label_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.label_methods->routines[6]))) (self,trigger,rcvr))
#define label_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.label_methods->routines[7]))) (self,trigger))
#define label_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.label_methods->routines[8]))) (self,trigger))
#define label_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.label_methods->routines[9]))) (self,trigger))
#define label_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.label_methods->routines[10]))) (self,trigger))
#define label_Read(self,file,id) \
    ((* ((long (*)())((self)->header.label_methods->routines[11]))) (self,file,id))
#define label_Write(self,file,writeid,level) \
    ((* ((long (*)())((self)->header.label_methods->routines[12]))) (self,file,writeid,level))
#define label_ReadOtherFormat(self,file,fmt,encoding,description) \
    ((* ((boolean (*)())((self)->header.label_methods->routines[13]))) (self,file,fmt,encoding,description))
#define label_WriteOtherFormat(self,file,writeid,level,usagetype,boundary) \
    ((* ((long (*)())((self)->header.label_methods->routines[14]))) (self,file,writeid,level,usagetype,boundary))
#define label_GetModified(self) \
    ((* ((long (*)())((self)->header.label_methods->routines[15]))) (self))
#define label_SetModified(self) \
    ((* ((void (*)())((self)->header.label_methods->routines[16]))) (self))
#define label_ViewName(self) \
    ((* ((char * (*)())((self)->header.label_methods->routines[17]))) (self))
#define label_SetAttributes(self,attributes) \
    ((* ((void (*)())((self)->header.label_methods->routines[18]))) (self,attributes))
#define label_Put(self,property,type,rock) \
    ((* ((void (*)())((self)->header.label_methods->routines[19]))) (self,property,type,rock))
#define label_Get(self,property,type,rock) \
    ((* ((short (*)())((self)->header.label_methods->routines[20]))) (self,property,type,rock))
#define label_ListCurrentViews(self,array,size) \
    ((* ((int (*)())((self)->header.label_methods->routines[21]))) (self,array,size))
#define label_RestoreModified(self,oldmodified) \
    ((* ((void (*)())((self)->header.label_methods->routines[22]))) (self,oldmodified))
#define label_UniqueID(self) \
 ((long)((&(self)->header.dataobject)))
#define label_GetWriteID(self) \
 ( ((&(self)->header.dataobject))->writeID )
#define label_SetWriteID(self,newValue) \
 ( (((&(self)->header.dataobject))->writeID) = (newValue) )
#define label_GetID(self) \
      ( ((&(self)->header.dataobject))->id )
#define label_SetID(self,newValue) \
      ( (((&(self)->header.dataobject))->id) = (newValue) )
#define label_SetText(self,text) \
    ((* ((void (*)())((self)->header.label_methods->routines[23]))) (self,text))
#define label_SetFont(self,fontfamily,style,size) \
    ((* ((void (*)())((self)->header.label_methods->routines[24]))) (self,fontfamily,style,size))
#define label_GetText(self) \
    ((* ((char * (*)())((self)->header.label_methods->routines[25]))) (self))
#define label_GetFont(self,style,size) \
    ((* ((char * (*)())((self)->header.label_methods->routines[26]))) (self,style,size))
#define label_SetFlags(self,flags) \
    ((* ((void (*)())((self)->header.label_methods->routines[27]))) (self,flags))
#define label_GetFlags(self) \
 ((self)->flags)

#define label_NewFromObject(self) \
    ((* ((struct label * (*)())((self)->header.label_methods->info->procs->routines[0]))) (&label_classheader, (self)->header.label_methods->info->versionnumber))
#define label_New() \
    (*((struct label * (*)()) (label_CLASSPROCEDURES->routines[0])))(&label_classheader,label_VERSION)
#define label_Initialize(self) \
    (*((void (*)()) (label_CLASSPROCEDURES->routines[2])))(&label_classheader,self, label_VERSION)

#define label_Destroy(self) \
    ((* ((void (*)()) ((self)->header.label_methods->info->procs->routines[1]))) (&label_classheader, self))
#define label_Finalize(self) \
    (*((void (*)()) (label_CLASSPROCEDURES->routines[3])))(&label_classheader,self)

#define label_InitializeObject(self) \
    (*((boolean (*)()) (label_CLASSPROCEDURES->routines[5])))(&label_classheader,self)
#define label_FinalizeObject(self) \
    (*((void (*)()) (label_CLASSPROCEDURES->routines[6])))(&label_classheader,self)


#endif /* !defined(label_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_label ) && !defined(class_StaticEntriesOnly)*/

