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


 

/* menulist.H
 * Class header file for menulist package.
 *
 */

#define menulist_GetMLVersion(alist)	((alist)->version)
#define menulist_RewindML(alist)		((alist)->curMenu = (alist)->menus)
#define menulist_RewindBeforeMC(alist)	((alist)->curChainBefore = (alist)->menuChainBefore)
#define menulist_RewindAfterMC(alist)	((alist)->curChainAfter = (alist)->menuChainAfter)

struct itemlist {
    struct itemlist *next;		/* next guy in the list */
    char *string;			/* what to put in the menu */
    long enableMask;			/* used to enable this item */ 
    long functionData;			/* sent when we call the procedure */
    struct proctable_Entry *proc;	/* what to call if selected */
};

struct headerlist {
    struct headerlist *next;
    long assocKey;				/* Association key. */
    struct menulist *menulist;		/* The menulist this link points to. */
};






/* 
 * End of information copied from menulist.ch.
 */ 
 
#endif /* class_StaticInfoOnly *//* 
 * Include the superclass information
 */ 
/* menulist has no super class */ 
 
 
#ifndef class_StaticInfoOnly
/* 
 * Data structure for menulist 
 */ 
struct menulist { 
    struct {
	struct basicobject_methods *menulist_methods;
    } header;
        long version;				/* version of the menu */
	long menuVersion;			/* version of self->menus */
        struct basicobject *object;		/* The guy who owns these menus. */
        struct itemlist *menus;			/* ptr to list of words and procs to call */
        struct itemlist *curMenu;		/* the current one */
        struct headerlist *menuChainBefore;	/* Pointer to linked list of before chained menulists */
        struct headerlist *menuChainAfter;	/* Pointer to linked list of after chained menulists */
        struct headerlist *curChainBefore;	/* the current before one */
        struct headerlist *curChainAfter;	/* the current after one */
        int *refcount;                          /* Pointer to a reference count for the menus field of this structure. */
	long selectMask, oldMask;		/* enables various items in list */
/* Window manager dependent fields. */
        long regionID;				/* region id for installed menu list; only needed for wm, wasted space for x. */
	long installVersion;			/* version displayed in wm */
	struct im *curIM;			/* the one we displayed in last */

};

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

#endif /* class_StaticInfoOnly */

#ifndef class_StaticInfoOnly

#ifndef menulist_PROGRAMMERVERSION
#define menulist_PROGRAMMERVERSION 1
#endif /* menulist_PROGRAMMERVERSION */

#ifdef menulist_VERSION
#undef menulist_VERSION
#endif /* menulist_VERSION */
#define menulist_VERSION ((((menulist_PROGRAMMERVERSION << 16) ^ (14 << 8) ^ sizeof(struct menulist)) & 0x7ffff) + 0x80000 + (66 << 20))


#endif /* class_StaticInfoOnly */
#define menulist_StaticLoadOnlyThisClass()  \
{ extern struct classinfo *menulist__GetClassInfo(); \
 extern struct classheader *menulist_classheader_StaticExport; \
  (void) class_EnterInfo(NULL, menulist_classheader_StaticExport->name, menulist__GetClassInfo, NULL, menulist_classheader_StaticExport->namekey); } 
 
#define menulist_StaticLoad()  \
    { \
    menulist_StaticLoadOnlyThisClass();  \
    } 
 
#define menulist_StaticEntry  {menulist_StaticLoad()} 
 
#ifndef class_StaticInfoOnly
static struct classheader menulist_classheader = {
    menulist_VERSION,
    "menulist",
    "menulist",
    (struct basicobject_methods *) &class_RoutineStruct,
};

#define menulist_CLASSPROCEDURES (menulist_classheader.classprocedures)
int menulist_classref_;
#endif /* class_StaticInfoOnly */

#endif /* menulist_DEFINED */

#if !defined(menulist_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_menulist) && !defined(class_StaticEntriesOnly)
#define menulist_ROUTINESDEFINED

#define menulist_DuplicateML(self,view) \
    ((* ((struct menulist * (*)())((self)->header.menulist_methods->routines[0]))) (self,view))
#define menulist_SetView(self,view) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[1]))) (self,view))
#define menulist_AddToML(self,menuString,menuProc,functionData,mask) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[2]))) (self,menuString,menuProc,functionData,mask))
#define menulist_DeleteFromML(self,menustring) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[3]))) (self,menustring))
#define menulist_ClearML(self) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[4]))) (self))
#define menulist_NextME(self,outString,outData,outProc) \
    ((* ((boolean (*)())((self)->header.menulist_methods->routines[5]))) (self,outString,outData,outProc))
#define menulist_NextBeforeMC(self) \
    ((* ((struct menulist * (*)())((self)->header.menulist_methods->routines[6]))) (self))
#define menulist_NextAfterMC(self) \
    ((* ((struct menulist * (*)())((self)->header.menulist_methods->routines[7]))) (self))
#define menulist_ChainBeforeML(self,chainee,key) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[8]))) (self,chainee,key))
#define menulist_ChainAfterML(self,chainee,key) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[9]))) (self,chainee,key))
#define menulist_UnchainML(self,key) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[10]))) (self,key))
#define menulist_GetChainedML(self,key) \
    ((* ((struct menulist * (*)())((self)->header.menulist_methods->routines[11]))) (self,key))
#define menulist_ClearChain(self) \
    ((* ((void (*)())((self)->header.menulist_methods->routines[12]))) (self))
#define menulist_SetMask(self,mask) \
    ((* ((boolean (*)())((self)->header.menulist_methods->routines[13]))) (self,mask))
#define menulist_GetMask(self) \
 ((self)->selectMask)
#define menulist_ItemIsEnabled(self,item) \
             (((self)->selectMask&(item)->enableMask)==(item)->enableMask)

#define menulist_NewFromObject(self) \
    ((* ((struct menulist * (*)())((self)->header.menulist_methods->info->procs->routines[0]))) (&menulist_classheader, (self)->header.menulist_methods->info->versionnumber))
#define menulist_New() \
    (*((struct menulist * (*)()) (menulist_CLASSPROCEDURES->routines[0])))(&menulist_classheader,menulist_VERSION)
#define menulist_Initialize(self) \
    (*((void (*)()) (menulist_CLASSPROCEDURES->routines[2])))(&menulist_classheader,self, menulist_VERSION)

#define menulist_Destroy(self) \
    ((* ((void (*)()) ((self)->header.menulist_methods->info->procs->routines[1]))) (&menulist_classheader, self))
#define menulist_Finalize(self) \
    (*((void (*)()) (menulist_CLASSPROCEDURES->routines[3])))(&menulist_classheader,self)

#define menulist_InitializeObject(self) \
    (*((boolean (*)()) (menulist_CLASSPROCEDURES->routines[5])))(&menulist_classheader,self)
#define menulist_FinalizeObject(self) \
    (*((void (*)()) (menulist_CLASSPROCEDURES->routines[6])))(&menulist_classheader,self)
#define menulist_Create(view) \
    (*((struct menulist * (*)()) (menulist_CLASSPROCEDURES->routines[7])))(&menulist_classheader,view)
#define menulist_NextMLVersion() \
    (*((int (*)()) (menulist_CLASSPROCEDURES->routines[8])))(&menulist_classheader)
#define menulist_IncrementMLVersion() \
    (*((void (*)()) (menulist_CLASSPROCEDURES->routines[9])))(&menulist_classheader)


#endif /* !defined(menulist_ROUTINESDEFINED) && !defined(dontDefineRoutinesFor_menulist ) && !defined(class_StaticEntriesOnly)*/

