
/*
 * This file was generated by the SOM Compiler.
 * FileName: G:\cwpsh\rel\os2c\include\base\os2\wpfntpal.xh.
 * Generated using:
 *     SOM Precompiler somipc: 2.29.1.14
 *     SOM Emitter emitxh: 2.43
 */

/*
 *   Module Header
 * 
 *   Module Name: WPFNTPAL
 * 
 *   OS/2 Presentation Manager Workplace class definitions
 * 
 *   Copyright (c) International Business Machines Corporation 1991, 1992
 * 
 */


#ifndef SOM_WPFontPalette_xh
#define SOM_WPFontPalette_xh

class WPFontPalette;

#define WPFontPalette_MajorVersion 1
#define WPFontPalette_MinorVersion 2

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_WPPalette_xh
#include <wppalet.xh>
#endif

#ifndef WPFontPalette_API
#define WPFontPalette_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */

class SOMClass;
class SOMObject;
class WPFolder;
class M_WPObject;
class WPObject;
class WPImageFile;
class M_WPAbstract;
class M_WPPalette;
class M_WPFontPalette;

/*
 * End of bindings for IDL types.
 */

/*
 * Passthru lines: File: "C.h", "after"
 */

   #define CCHFONTNAME   80

      /* Fontpot structure */

      typedef struct _FONTPOT
      {
         CELL        cell;     /* Size of the data that follows */
         FATTRS      fAttrs;   /* fattrs from WinFontDlg/wpfattrsfrompsz */
         CHAR        szFont[CCHFONTNAME+1];
      } FONTPOT;
      typedef FONTPOT *PFONTPOT;


/* A procedure to create the WPFontPalette Class */
class M_WPFontPalette;
SOMEXTERN M_WPFontPalette * SOMLINK WPFontPaletteNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the WPFontPalette class object, and the methods it introduces. */
SOMEXTERN struct WPFontPaletteClassDataStructure {
	M_WPFontPalette *classObject;
	somMToken wpGetFattrsFromPsz;
} SOMDLINK WPFontPaletteClassData;
#define _WPFontPalette WPFontPaletteClassData.classObject

/* The API to parentMtabs for WPFontPalette, and the instance data it introduces. */
SOMEXTERN struct WPFontPaletteCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK WPFontPaletteCClassData;

/*
 * -- Typedefs for WPFontPalette Method Procedures
 */
SOMEXTERN {
typedef void   SOMLINK somTP_WPFontPalette_wpGetFattrsFromPsz(WPFontPalette *somSelf, 
		PSZ pszFont, 
		PFATTRS pFattrs);
typedef somTP_WPFontPalette_wpGetFattrsFromPsz *somTD_WPFontPalette_wpGetFattrsFromPsz;

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef M_WPFontPalette*   SOMLINK somTP_WPFontPalette_somGetClass(WPFontPalette *somSelf);
typedef somTP_WPFontPalette_somGetClass *somTD_WPFontPalette_somGetClass;
}

#endif /* WPFontPalette_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for WPFontPalette
 */
class WPFontPalette : public WPPalette
{
public:

// WPFontPalette::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_WPFontPalette) WPFontPaletteNewClass(WPFontPalette_MajorVersion,WPFontPalette_MinorVersion);
   return (void*)
      SOM_Resolve(_WPFontPalette,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_WPFontPalette));
}

// WPFontPalette::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

WPFontPalette& operator=(WPFontPalette& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

WPFontPalette()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

WPFontPalette(WPFontPalette* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

WPFontPalette(const WPFontPalette* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/* method: wpGetFattrsFromPsz */
void   wpGetFattrsFromPsz(PSZ pszFont, 
		PFATTRS pFattrs)
{
   SOM_ResolveD(this,WPFontPalette,WPFontPalette,wpGetFattrsFromPsz)
	(this,pszFont,pFattrs);
}


/*
 * Reintroduce inherited methods
 */

/* method: somGetClass */
M_WPFontPalette*  somGetClass()
{
/*
 *  Return the receiver's class.
 */
   return SOM_ResolveD(this,WPFontPalette,SOMObject,somGetClass)
	(this);
}



};   /* WPFontPalette */



#endif       /* SOM_WPFontPalette_xh */

#ifndef SOM_M_WPFontPalette_xh
#define SOM_M_WPFontPalette_xh

class M_WPFontPalette;

#define M_WPFontPalette_MajorVersion 1
#define M_WPFontPalette_MinorVersion 2

/* C++ SOM defs */
#include <somcls.xh>
#include <somcm.xh>

/* C++ parent defs */
#ifndef SOM_M_WPPalette_xh
#include <wppalet.xh>
#endif

#ifndef M_WPFontPalette_API
#define M_WPFontPalette_API
/*
 * -- The Class API
 */

/*
 * Start of bindings for IDL types
 */


/*
 * End of bindings for IDL types.
 */

/*
 * -- M_WPFontPalette is a metaclass for WPFontPalette. Make sure WPFontPalette is known.
 */
class WPFontPalette;


/* A procedure to create the M_WPFontPalette Class */
SOMEXTERN SOMClass * SOMLINK M_WPFontPaletteNewClass(
		integer4 majorVersion,
		integer4 minorVersion);

/* The API to the M_WPFontPalette class object, and the methods it introduces. */
SOMEXTERN struct M_WPFontPaletteClassDataStructure {
	SOMClass *classObject;
} SOMDLINK M_WPFontPaletteClassData;
#define _M_WPFontPalette M_WPFontPaletteClassData.classObject

/* The API to parentMtabs for M_WPFontPalette, and the instance data it introduces. */
SOMEXTERN struct M_WPFontPaletteCClassDataStructure {
	somMethodTabs parentMtab;
	somDToken              instanceDataToken;
} SOMDLINK M_WPFontPaletteCClassData;

/*
 * -- Typedefs for M_WPFontPalette Method Procedures
 */
SOMEXTERN {

/*
 * -- Typedefs for Reintroduced Wrapper Methods
 */
typedef WPFontPalette*   SOMLINK somTP_M_WPFontPalette_somNew(M_WPFontPalette *somSelf);
typedef somTP_M_WPFontPalette_somNew *somTD_M_WPFontPalette_somNew;
}

#endif /* M_WPFontPalette_API */


/*
 * -- This emitter treats Method Tokens as Thunks by default.
 * -- Use the sc modifier "nothunks" to change this default
 */
#undef somresolve_
#define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))

/*
 * -- The C++ Wrapper Class for M_WPFontPalette
 */
class M_WPFontPalette : public M_WPPalette
{
public:

// M_WPFontPalette::new creates the class object if necessary, and then uses somNewNoInit
// to allocate memory and create the object. Initialization is in ctors.
void *operator new(size_t)
{
   if (!_M_WPFontPalette) M_WPFontPaletteNewClass(M_WPFontPalette_MajorVersion,M_WPFontPalette_MinorVersion);
   return (void*)
      SOM_Resolve(_M_WPFontPalette,SOMClass,somNewNoInit)
         ((SOMClass *)((void*)_M_WPFontPalette));
}

// M_WPFontPalette::delete uses somDestruct.
void operator delete(void * obj)
{
   if (obj && *(void**)obj) {
      SOM_Resolve(obj,SOMObject,somDestruct)
         ((SOMObject*)obj, 1, 0);
   }
}

M_WPFontPalette& operator=(M_WPFontPalette& fromObj)
{
   this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
   return *this;
}

M_WPFontPalette()
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultInit(0);
}

M_WPFontPalette(M_WPFontPalette* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
}

M_WPFontPalette(const M_WPFontPalette* fromObj)
{
   if (*(void**)this != 
       ((somParentMtabStructPtr)
        (M_WPFontPaletteCClassData.parentMtab))->mtab)
      return;
   ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
}


/*
 * Reintroduce inherited methods
 */

/* method: somNew */
WPFontPalette*  somNew()
{
   return SOM_ResolveD(this,M_WPFontPalette,SOMClass,somNew)
	(this);
}



};   /* M_WPFontPalette */



#endif       /* SOM_M_WPFontPalette_xh */
