// This may look like C code, but it is really -*- C++ -*-

/***********************************************************
Copyright 1991 by the Massachusetts Institute of Technology

Permission to use, copy, modify, distribute, and sell 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 and this permission notice appear in supporting
documentation, and that the name of M.I.T. not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission.  M.I.T. makes no representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

Author: Roman J. Budzianowski - Project Athena MIT

******************************************************************/

/**

	This macro can be used in place of the  constructors
	in the Widget classes

**/

#ifndef Constructors

#if defined(__STDC__)

#define Constructors(widget_prefix,class_prefix) \
widget_prefix##Widget(String name,\
		   Widget parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(name,parent, class_prefix##WidgetClass,args,numArgs); } \
widget_prefix##Widget(String name, \
		   Core& parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(name,&parent, class_prefix##WidgetClass,args,numArgs); } \
widget_prefix##Widget(ManageState manage,\
		   String name,\
		   Widget parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(manage,name,parent, class_prefix##WidgetClass,args,numArgs); } \
widget_prefix##Widget(ManageState manage,\
		   String name, \
		   Core& parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(manage,name,&parent, class_prefix##WidgetClass,args,numArgs); } \
widget_prefix##Widget()

#else

#define Constructors(widget_prefix,class_prefix) \
widget_prefix/**/Widget(String name,\
		   Widget parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(name,parent, class_prefix/**/WidgetClass,args,numArgs); } \
widget_prefix/**/Widget(String name, \
		   Core& parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(name,&parent, class_prefix/**/WidgetClass,args,numArgs); } \
widget_prefix/**/Widget(ManageState manage,\
	           String name,\
		   Widget parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(manage,name,parent, class_prefix/**/WidgetClass,args,numArgs); } \
widget_prefix/**/Widget(ManageState manage,\
	           String name, \
		   Core& parent,\
		   ArgList args = NULL,\
		   Cardinal numArgs = 0)\
{ CreateWidget(manage,name,&parent, class_prefix/**/WidgetClass,args,numArgs); } \
widget_prefix/**/Widget()

#endif __STDC_

#endif
