
/*
 * This file was generated by the SOM Compiler.
 * FileName: wpscheme.xh.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emitxh: 1.11
 */

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

#ifndef wpscheme_xh
#define wpscheme_xh
class WPSchemePalette;

#define WPSchemePalette_MajorVersion 1
#define WPSchemePalette_MinorVersion 2

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

/* C++ parent def */
#ifndef wppalet_xh
#include "wppalet.xh"
#endif

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

      /*
       * Scheme palette entry
       */

      #define CCHSCHEMENAME 30
      #define CCHFONTNAME   60

      typedef struct _SCHEME
      {
         CELL  cell;           /* Size of the data that follows */
         ULONG RGBSysColor[SYSCLR_CSYSCOLORS];
         ULONG cxBorder;
         ULONG cyBorder;
         CHAR  szName[CCHSCHEMENAME+1];  /* Name of this scheme */
         CHAR  szWindowFont[CCHFONTNAME+1];    /* System font */
         CHAR  szTitleFont[CCHFONTNAME+1];     /* System font */
         CHAR  szMenuFont[CCHFONTNAME+1];      /* System font */
         CHAR  szIconFont[CCHFONTNAME+1];      /* System font */
      } SCHEME;
      typedef SCHEME *PSCHEME;

      /*
       *  Macros to extract RGB colors from a given scheme
       */

      #define SYSCLR_TO_INDEX(s) (s - SYSCLR_HELPHILITE + SYSCLR_CSYSCOLORS - 1)

      #define INDEX_TO_SYSCLR(s) (s + SYSCLR_HELPHILITE - SYSCLR_CSYSCOLORS + 1)

      #define RGB_FROM_SYSCLR(psch,sysclr)                       \
                ( psch ? ( psch->RGBSysColor[ SYSCLR_TO_INDEX(sysclr) ] ) \
                       : WinQuerySysColor( HWND_DESKTOP, sysclr, 0 ) )


#ifndef WPSchemePalette_API
#define WPSchemePalette_API
/*
 * The Class API
 */

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

/* A macro to return the WPSchemePalette class object */
class M_WPSchemePalette;
#define _WPSchemePalette ((M_WPSchemePalette*)WPSchemePaletteClassData.classObject)

/* The static interface to WPSchemePalette and its instances */
SOMEXTERN struct WPSchemePaletteClassDataStructure {
	SOMClass *classObject;
} WPSchemePaletteClassData;

/*
 * -- Typedefs for Procedures that support WPSchemePalette Methods
 */
extern "C" {
}


#endif /* WPSchemePalette_API */


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

void *operator new(size_t size)
{
   (void) size;
   if (!WPSchemePaletteClassData.classObject) 
      WPSchemePaletteNewClass(WPSchemePalette_MajorVersion,WPSchemePalette_MinorVersion);
   return (void *)
      ((somTD_SOMClass_somNew)
      somResolve(SOM_TestCls((SOMAny *)(WPSchemePaletteClassData.classObject),
                             SOMClassClassData.classObject),
                 SOMClassClassData.somNew))
         ((SOMClass*)(WPSchemePaletteClassData.classObject));
}

void operator delete(void * obj)
{
   ((SOMObject *)obj)->somFree();
}


};   /* WPSchemePalette */



#endif       /* wpscheme_xh */

/*
 * This file was generated by the SOM Compiler.
 * FileName: wpscheme.xh.
 * Generated using:
 *     SOM Precompiler spc: 1.22
 *     SOM Emitter emitxh: 1.11
 */
#ifndef wpscheme_mxh
#define wpscheme_mxh
class M_WPSchemePalette;

#define M_WPSchemePalette_MajorVersion 1
#define M_WPSchemePalette_MinorVersion 2

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

/* C++ parent def */
#ifndef wppalet_xh
#include "wppalet.xh"
#endif

#ifndef M_WPSchemePalette_API
#define M_WPSchemePalette_API
/*
 * The Class API
 */

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

/* A macro to return the M_WPSchemePalette class object */
#define _M_WPSchemePalette ((SOMClass*)M_WPSchemePaletteClassData.classObject)

/* The static interface to M_WPSchemePalette and its instances */
SOMEXTERN struct M_WPSchemePaletteClassDataStructure {
	SOMClass *classObject;
} M_WPSchemePaletteClassData;

/*
 * -- Typedefs for Procedures that support M_WPSchemePalette Methods
 */
extern "C" {
}


#endif /* M_WPSchemePalette_API */


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

void *operator new(size_t size)
{
   (void) size;
   if (!M_WPSchemePaletteClassData.classObject) 
      M_WPSchemePaletteNewClass(M_WPSchemePalette_MajorVersion,M_WPSchemePalette_MinorVersion);
   return (void *)
      ((somTD_SOMClass_somNew)
      somResolve(SOM_TestCls((SOMAny *)(M_WPSchemePaletteClassData.classObject),
                             SOMClassClassData.classObject),
                 SOMClassClassData.somNew))
         ((SOMClass*)(M_WPSchemePaletteClassData.classObject));
}

void operator delete(void * obj)
{
   ((SOMObject *)obj)->somFree();
}


};   /* M_WPSchemePalette */



#endif       /* wpscheme_mxh */
