 
#ifndef pushbutton_DEFINED
#define pushbutton_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 pshbttn.ch and will be
 * overwritten.  Make changes to pshbttn.ch instead.
 */ 
 
#ifndef class_StaticInfoOnly
/* 
 * The following information was copied, as-is, from pshbttn.ch.
 */ 
 
/* ********************************************************************** *\
 *         Copyright IBM Corporation 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.
* $
*/


/*
  Ooops.  I screwed up.

  It is the insets responsibility to read through their \enddata's.
  The old version of this code didn't.  This one does.
  Problem is, I changed the datastream representation that tickles this
  bug in the old version of this code.

  This means that if I were to release this code, with the new
  datastream, now, I will cause old code to break (badly) when reading
  documents created with the new code.

  So, for patch level 8, which the world will get (particularly CMU
  campus), the nifty color stuff has no UI, and the old datastream is
  written.  (But both the old and the new datastreams will be supported.)

  For patch level 9, undefine "PL8", and the UI to the new features will
  be available, and the new datastream will be written.  This means that
  people running PL8 will be able to read documents created using PL9 
  features.

  NOTE: users who save PL9-created documents under PL8-code will
  keep information, since the PL8 code will write the new datastream,
  if it reads an inset with the new datastream!

  So, remember inset designers, slurp up those \enddata's!
*/
/* #define PL8 */ /* enable color */

/*
  Appearances for pushbutton:

  Style  Look
    0    plain, in line text
    1    a boxed rectangle
    2    a motif-ish 3-Dish button
    3    A mac-ish rounded rectangle box
    4    a single rectangle
*/
#define pushbutton_PLAIN 0
#define pushbutton_BOXEDRECT 1
#define pushbutton_THREEDEE 2
#define pushbutton_ROUNDRECT 3
#define pushbutton_PLAINBOX 4
#define pushbutton_MOTIF 5







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

 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for pushbutton 
 */ 
struct pushbutton { 
    union {
	struct basicobject_methods *pushbutton_methods;
	struct traced traced;
	struct observable observable;
	struct dataobject dataobject;
    } header;
    char *text;
    int style;
    struct fontdesc *myfontdesc;
    char *foreground_name, *background_name;
    unsigned char foreground_color[3], background_color[3];
#ifdef PL8
    int new_DS;
#endif /* PL8 */


};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef pushbutton_PROGRAMMERVERSION
#define pushbutton_PROGRAMMERVERSION 1
#endif /* pushbutton_PROGRAMMERVERSION */

#ifdef pushbutton_VERSION
#undef pushbutton_VERSION
#endif /* pushbutton_VERSION */
#define pushbutton_VERSION ((((pushbutton_PROGRAMMERVERSION << 16) ^ (31 << 8) ^ sizeof(struct pushbutton)) & 0x7ffff) + 0x80000 + (2 << 20))


#endif /* class_StaticInfoOnly */
#define pushbutton_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *pushbutton__GetClassInfo(); \
 extern struct classheader *pshbttn_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, pshbttn_classheader_StaticExport->name, pushbutton__GetClassInfo, NULL, pshbttn_classheader_StaticExport->namekey); } 
 
#define pushbutton_StaticLoad()  \
    { \
    dataobject_StaticLoad(); \
    pushbutton_StaticLoadOnlyThisClass();  \
    } 
 
#define pushbutton_StaticEntry  {pushbutton_StaticLoad()} 
 
#define pshbttn_StaticEntry  {pushbutton_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader pushbutton_classheader = {
    pushbutton_VERSION,
    "pushbutton",
    "pshbttn",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define pushbutton_CLASSPROCEDURES (pushbutton_classheader.classprocedures)
int pshbttn_classref_;
#endif /* class_StaticInfoOnly */

#endif /* pushbutton_DEFINED */

#if !defined(pushbutton_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_pushbutton) && !defined(class_StaticEntriesOnly)
#define pushbutton_ROUTINESDEFINED

#define pushbutton_Reference(self) \
 (((&(self)->header.traced))->refcount++)
#define pushbutton_UnReference(self) \
 ((((&(self)->header.traced))->refcount>0)?((&(self)->header.traced))->refcount--:0)
#define pushbutton_ReferenceCount(self) \
 (((&(self)->header.traced))->refcount)
#define pushbutton_AddObserver(self,observer) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[0]))) (self,observer))
#define pushbutton_IsObserver(self,observer) \
    ((* ((boolean (*)())((self)->header.pushbutton_methods->routines[1]))) (self,observer))
#define pushbutton_RemoveObserver(self,observer) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[2]))) (self,observer))
#define pushbutton_NotifyObservers(self,value) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[3]))) (self,value))
#define pushbutton_ObservedChanged(self,changed,value) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[4]))) (self,changed,value))
#define pushbutton_AddRecipient(self,trigger,rcvr,func,rock) \
    ((* ((boolean (*)())((self)->header.pushbutton_methods->routines[5]))) (self,trigger,rcvr,func,rock))
#define pushbutton_DeleteRecipient(self,trigger,rcvr) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[6]))) (self,trigger,rcvr))
#define pushbutton_PullTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[7]))) (self,trigger))
#define pushbutton_DisableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[8]))) (self,trigger))
#define pushbutton_EnableTrigger(self,trigger) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[9]))) (self,trigger))
#define pushbutton_DisableCount(self,trigger) \
    ((* ((long (*)())((self)->header.pushbutton_methods->routines[10]))) (self,trigger))
#define pushbutton_Read(self,file,id) \
    ((* ((long (*)())((self)->header.pushbutton_methods->routines[11]))) (self,file,id))
#define pushbutton_Write(self,file,writeid,level) \
    ((* ((long (*)())((self)->header.pushbutton_methods->routines[12]))) (self,file,writeid,level))
#define pushbutton_ReadOtherFormat(self,file,fmt,encoding,description) \
    ((* ((boolean (*)())((self)->header.pushbutton_methods->routines[13]))) (self,file,fmt,encoding,description))
#define pushbutton_WriteOtherFormat(self,file,writeid,level,usagetype,boundary) \
    ((* ((long (*)())((self)->header.pushbutton_methods->routines[14]))) (self,file,writeid,level,usagetype,boundary))
#define pushbutton_GetModified(self) \
    ((* ((long (*)())((self)->header.pushbutton_methods->routines[15]))) (self))
#define pushbutton_SetModified(self) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[16]))) (self))
#define pushbutton_ViewName(self) \
    ((* ((char * (*)())((self)->header.pushbutton_methods->routines[17]))) (self))
#define pushbutton_SetAttributes(self,attributes) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[18]))) (self,attributes))
#define pushbutton_Put(self,property,type,rock) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[19]))) (self,property,type,rock))
#define pushbutton_Get(self,property,type,rock) \
    ((* ((short (*)())((self)->header.pushbutton_methods->routines[20]))) (self,property,type,rock))
#define pushbutton_ListCurrentViews(self,array,size) \
    ((* ((int (*)())((self)->header.pushbutton_methods->routines[21]))) (self,array,size))
#define pushbutton_RestoreModified(self,oldmodified) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[22]))) (self,oldmodified))
#define pushbutton_UniqueID(self) \
 ((long)((&(self)->header.dataobject)))
#define pushbutton_GetWriteID(self) \
 ( ((&(self)->header.dataobject))->writeID )
#define pushbutton_SetWriteID(self,newValue) \
 ( (((&(self)->header.dataobject))->writeID) = (newValue) )
#define pushbutton_GetID(self) \
      ( ((&(self)->header.dataobject))->id )
#define pushbutton_SetID(self,newValue) \
      ( (((&(self)->header.dataobject))->id) = (newValue) )
#define pushbutton_SetText(self,txt) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[23]))) (self,txt))
#define pushbutton_SetStyle(self,stylecode) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[24]))) (self,stylecode))
#define pushbutton_SetButtonFont(self,f) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[25]))) (self,f))
#define pushbutton_SetFGColor(self,name,red,green,blue) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[26]))) (self,name,red,green,blue))
#define pushbutton_SetBGColor(self,name,red,green,blue) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[27]))) (self,name,red,green,blue))
#define pushbutton_GetFGColor(self,rgb_vect) \
    ((* ((char * (*)())((self)->header.pushbutton_methods->routines[28]))) (self,rgb_vect))
#define pushbutton_GetBGColor(self,rgb_vect) \
    ((* ((char * (*)())((self)->header.pushbutton_methods->routines[29]))) (self,rgb_vect))
#define pushbutton_ParseRGB(self,rgb_string,rgb_vect) \
    ((* ((void (*)())((self)->header.pushbutton_methods->routines[30]))) (self,rgb_string,rgb_vect))
#define pushbutton_GetText(self) \
 ((self)->text)
#define pushbutton_GetStyle(self) \
 ((self)->style)
#define pushbutton_GetButtonFont(self) \
 ((self)->myfontdesc)

#define pushbutton_NewFromObject(self) \
    ((* ((struct pushbutton * (*)())((self)->header.pushbutton_methods->info->procs->routines[0]))) (&pushbutton_classheader, (self)->header.pushbutton_methods->info->versionnumber))
#define pushbutton_New() \
    (*((struct pushbutton * (*)()) (pushbutton_CLASSPROCEDURES->routines[0])))(&pushbutton_classheader,pushbutton_VERSION)
#define pushbutton_Initialize(self) \
    (*((void (*)()) (pushbutton_CLASSPROCEDURES->routines[2])))(&pushbutton_classheader,self, pushbutton_VERSION)

#define pushbutton_Destroy(self) \
    ((* ((void (*)()) ((self)->header.pushbutton_methods->info->procs->routines[1]))) (&pushbutton_classheader, self))
#define pushbutton_Finalize(self) \
    (*((void (*)()) (pushbutton_CLASSPROCEDURES->routines[3])))(&pushbutton_classheader,self)

#define pushbutton_InitializeObject(self) \
    (*((boolean (*)()) (pushbutton_CLASSPROCEDURES->routines[5])))(&pushbutton_classheader,self)
#define pushbutton_FinalizeObject(self) \
    (*((void (*)()) (pushbutton_CLASSPROCEDURES->routines[6])))(&pushbutton_classheader,self)
#define pushbutton_InitializeClass() \
    (*((boolean (*)()) (pushbutton_CLASSPROCEDURES->routines[7])))(&pushbutton_classheader)


#endif /* !defined(pushbutton_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_pushbutton ) && !defined(class_StaticEntriesOnly)*/

