home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / wpfntpal.xh < prev    next >
Text File  |  1999-03-15  |  9KB  |  371 lines

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: E:\cwpsh\rel\os2c\include\base\os2\wpfntpal.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.29.1.14
  7.  *     SOM Emitter emitxh: 2.43
  8.  */
  9.  
  10. /*
  11.  *   Module Header
  12.  * 
  13.  *   Module Name: WPFNTPAL
  14.  * 
  15.  *   OS/2 Presentation Manager Workplace class definitions
  16.  * 
  17.  *   Copyright (c) International Business Machines Corporation 1991, 1992
  18.  * 
  19.  */
  20.  
  21.  
  22. #ifndef SOM_WPFontPalette_xh
  23. #define SOM_WPFontPalette_xh
  24.  
  25. class WPFontPalette;
  26.  
  27. #define WPFontPalette_MajorVersion 1
  28. #define WPFontPalette_MinorVersion 2
  29.  
  30. /* C++ SOM defs */
  31. #include <somcls.xh>
  32. #include <somcm.xh>
  33.  
  34. /* C++ parent defs */
  35. #ifndef SOM_WPPalette_xh
  36. #include <wppalet.xh>
  37. #endif
  38.  
  39. #ifndef WPFontPalette_API
  40. #define WPFontPalette_API
  41. /*
  42.  * -- The Class API
  43.  */
  44.  
  45. /*
  46.  * Start of bindings for IDL types
  47.  */
  48.  
  49. class SOMClass;
  50. class SOMObject;
  51. class WPFolder;
  52. class M_WPObject;
  53. class WPObject;
  54. class WPImageFile;
  55. class M_WPAbstract;
  56. class M_WPPalette;
  57. class M_WPFontPalette;
  58.  
  59. /*
  60.  * End of bindings for IDL types.
  61.  */
  62.  
  63. /*
  64.  * Passthru lines: File: "C.h", "after"
  65.  */
  66.  
  67.    #define CCHFONTNAME   80
  68.  
  69.       /* Fontpot structure */
  70.  
  71.       typedef struct _FONTPOT
  72.       {
  73.          CELL        cell;     /* Size of the data that follows */
  74.          FATTRS      fAttrs;   /* fattrs from WinFontDlg/wpfattrsfrompsz */
  75.          CHAR        szFont[CCHFONTNAME+1];
  76.       } FONTPOT;
  77.       typedef FONTPOT *PFONTPOT;
  78.  
  79.  
  80. /* A procedure to create the WPFontPalette Class */
  81. class M_WPFontPalette;
  82. SOMEXTERN M_WPFontPalette * SOMLINK WPFontPaletteNewClass(
  83.         integer4 majorVersion,
  84.         integer4 minorVersion);
  85.  
  86. /* The API to the WPFontPalette class object, and the methods it introduces. */
  87. SOMEXTERN struct WPFontPaletteClassDataStructure {
  88.     M_WPFontPalette *classObject;
  89.     somMToken wpGetFattrsFromPsz;
  90. } SOMDLINK WPFontPaletteClassData;
  91. #define _WPFontPalette WPFontPaletteClassData.classObject
  92.  
  93. /* The API to parentMtabs for WPFontPalette, and the instance data it introduces. */
  94. SOMEXTERN struct WPFontPaletteCClassDataStructure {
  95.     somMethodTabs parentMtab;
  96.     somDToken              instanceDataToken;
  97. } SOMDLINK WPFontPaletteCClassData;
  98.  
  99. /*
  100.  * -- Typedefs for WPFontPalette Method Procedures
  101.  */
  102. SOMEXTERN {
  103. typedef void   SOMLINK somTP_WPFontPalette_wpGetFattrsFromPsz(WPFontPalette *somSelf, 
  104.         PSZ pszFont, 
  105.         PFATTRS pFattrs);
  106. typedef somTP_WPFontPalette_wpGetFattrsFromPsz *somTD_WPFontPalette_wpGetFattrsFromPsz;
  107.  
  108. /*
  109.  * -- Typedefs for Reintroduced Wrapper Methods
  110.  */
  111. typedef M_WPFontPalette*   SOMLINK somTP_WPFontPalette_somGetClass(WPFontPalette *somSelf);
  112. typedef somTP_WPFontPalette_somGetClass *somTD_WPFontPalette_somGetClass;
  113. }
  114.  
  115. #endif /* WPFontPalette_API */
  116.  
  117.  
  118. /*
  119.  * -- This emitter treats Method Tokens as Thunks by default.
  120.  * -- Use the sc modifier "nothunks" to change this default
  121.  */
  122. #undef somresolve_
  123. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  124.  
  125. /*
  126.  * -- The C++ Wrapper Class for WPFontPalette
  127.  */
  128. class WPFontPalette : public WPPalette
  129. {
  130. public:
  131.  
  132. // WPFontPalette::new creates the class object if necessary, and then uses somNewNoInit
  133. // to allocate memory and create the object. Initialization is in ctors.
  134. void *operator new(size_t)
  135. {
  136.    if (!_WPFontPalette) WPFontPaletteNewClass(WPFontPalette_MajorVersion,WPFontPalette_MinorVersion);
  137.    return (void*)
  138.       SOM_Resolve(_WPFontPalette,SOMClass,somNewNoInit)
  139.          ((SOMClass *)((void*)_WPFontPalette));
  140. }
  141.  
  142. // WPFontPalette::delete uses somDestruct.
  143. void operator delete(void * obj)
  144. {
  145.    if (obj && *(void**)obj) {
  146.       SOM_Resolve(obj,SOMObject,somDestruct)
  147.          ((SOMObject*)obj, 1, 0);
  148.    }
  149. }
  150.  
  151. WPFontPalette& operator=(WPFontPalette& fromObj)
  152. {
  153.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  154.    return *this;
  155. }
  156.  
  157. WPFontPalette()
  158. {
  159.    if (*(void**)this != 
  160.        ((somParentMtabStructPtr)
  161.         (WPFontPaletteCClassData.parentMtab))->mtab)
  162.       return;
  163.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  164. }
  165.  
  166. WPFontPalette(WPFontPalette* fromObj)
  167. {
  168.    if (*(void**)this != 
  169.        ((somParentMtabStructPtr)
  170.         (WPFontPaletteCClassData.parentMtab))->mtab)
  171.       return;
  172.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  173. }
  174.  
  175. WPFontPalette(const WPFontPalette* fromObj)
  176. {
  177.    if (*(void**)this != 
  178.        ((somParentMtabStructPtr)
  179.         (WPFontPaletteCClassData.parentMtab))->mtab)
  180.       return;
  181.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  182. }
  183.  
  184.  
  185. /* method: wpGetFattrsFromPsz */
  186. void   wpGetFattrsFromPsz(PSZ pszFont, 
  187.         PFATTRS pFattrs)
  188. {
  189.    SOM_ResolveD(this,WPFontPalette,WPFontPalette,wpGetFattrsFromPsz)
  190.     (this,pszFont,pFattrs);
  191. }
  192.  
  193.  
  194. /*
  195.  * Reintroduce inherited methods
  196.  */
  197.  
  198. /* method: somGetClass */
  199. M_WPFontPalette*  somGetClass()
  200. {
  201. /*
  202.  *  Return the receiver's class.
  203.  */
  204.    return SOM_ResolveD(this,WPFontPalette,SOMObject,somGetClass)
  205.     (this);
  206. }
  207.  
  208.  
  209.  
  210. };   /* WPFontPalette */
  211.  
  212.  
  213.  
  214. #endif       /* SOM_WPFontPalette_xh */
  215.  
  216. #ifndef SOM_M_WPFontPalette_xh
  217. #define SOM_M_WPFontPalette_xh
  218.  
  219. class M_WPFontPalette;
  220.  
  221. #define M_WPFontPalette_MajorVersion 1
  222. #define M_WPFontPalette_MinorVersion 2
  223.  
  224. /* C++ SOM defs */
  225. #include <somcls.xh>
  226. #include <somcm.xh>
  227.  
  228. /* C++ parent defs */
  229. #ifndef SOM_M_WPPalette_xh
  230. #include <wppalet.xh>
  231. #endif
  232.  
  233. #ifndef M_WPFontPalette_API
  234. #define M_WPFontPalette_API
  235. /*
  236.  * -- The Class API
  237.  */
  238.  
  239. /*
  240.  * Start of bindings for IDL types
  241.  */
  242.  
  243.  
  244. /*
  245.  * End of bindings for IDL types.
  246.  */
  247.  
  248. /*
  249.  * -- M_WPFontPalette is a metaclass for WPFontPalette. Make sure WPFontPalette is known.
  250.  */
  251. class WPFontPalette;
  252.  
  253.  
  254. /* A procedure to create the M_WPFontPalette Class */
  255. SOMEXTERN SOMClass * SOMLINK M_WPFontPaletteNewClass(
  256.         integer4 majorVersion,
  257.         integer4 minorVersion);
  258.  
  259. /* The API to the M_WPFontPalette class object, and the methods it introduces. */
  260. SOMEXTERN struct M_WPFontPaletteClassDataStructure {
  261.     SOMClass *classObject;
  262. } SOMDLINK M_WPFontPaletteClassData;
  263. #define _M_WPFontPalette M_WPFontPaletteClassData.classObject
  264.  
  265. /* The API to parentMtabs for M_WPFontPalette, and the instance data it introduces. */
  266. SOMEXTERN struct M_WPFontPaletteCClassDataStructure {
  267.     somMethodTabs parentMtab;
  268.     somDToken              instanceDataToken;
  269. } SOMDLINK M_WPFontPaletteCClassData;
  270.  
  271. /*
  272.  * -- Typedefs for M_WPFontPalette Method Procedures
  273.  */
  274. SOMEXTERN {
  275.  
  276. /*
  277.  * -- Typedefs for Reintroduced Wrapper Methods
  278.  */
  279. typedef WPFontPalette*   SOMLINK somTP_M_WPFontPalette_somNew(M_WPFontPalette *somSelf);
  280. typedef somTP_M_WPFontPalette_somNew *somTD_M_WPFontPalette_somNew;
  281. }
  282.  
  283. #endif /* M_WPFontPalette_API */
  284.  
  285.  
  286. /*
  287.  * -- This emitter treats Method Tokens as Thunks by default.
  288.  * -- Use the sc modifier "nothunks" to change this default
  289.  */
  290. #undef somresolve_
  291. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  292.  
  293. /*
  294.  * -- The C++ Wrapper Class for M_WPFontPalette
  295.  */
  296. class M_WPFontPalette : public M_WPPalette
  297. {
  298. public:
  299.  
  300. // M_WPFontPalette::new creates the class object if necessary, and then uses somNewNoInit
  301. // to allocate memory and create the object. Initialization is in ctors.
  302. void *operator new(size_t)
  303. {
  304.    if (!_M_WPFontPalette) M_WPFontPaletteNewClass(M_WPFontPalette_MajorVersion,M_WPFontPalette_MinorVersion);
  305.    return (void*)
  306.       SOM_Resolve(_M_WPFontPalette,SOMClass,somNewNoInit)
  307.          ((SOMClass *)((void*)_M_WPFontPalette));
  308. }
  309.  
  310. // M_WPFontPalette::delete uses somDestruct.
  311. void operator delete(void * obj)
  312. {
  313.    if (obj && *(void**)obj) {
  314.       SOM_Resolve(obj,SOMObject,somDestruct)
  315.          ((SOMObject*)obj, 1, 0);
  316.    }
  317. }
  318.  
  319. M_WPFontPalette& operator=(M_WPFontPalette& fromObj)
  320. {
  321.    this->somDefaultAssign(0,(SOMObject*)((void*)&fromObj));
  322.    return *this;
  323. }
  324.  
  325. M_WPFontPalette()
  326. {
  327.    if (*(void**)this != 
  328.        ((somParentMtabStructPtr)
  329.         (M_WPFontPaletteCClassData.parentMtab))->mtab)
  330.       return;
  331.    ((SOMObject*)((void*)this))->somDefaultInit(0);
  332. }
  333.  
  334. M_WPFontPalette(M_WPFontPalette* fromObj)
  335. {
  336.    if (*(void**)this != 
  337.        ((somParentMtabStructPtr)
  338.         (M_WPFontPaletteCClassData.parentMtab))->mtab)
  339.       return;
  340.    ((SOMObject*)((void*)this))->somDefaultCopyInit(0,((SOMObject*)((void*)fromObj)));
  341. }
  342.  
  343. M_WPFontPalette(const M_WPFontPalette* fromObj)
  344. {
  345.    if (*(void**)this != 
  346.        ((somParentMtabStructPtr)
  347.         (M_WPFontPaletteCClassData.parentMtab))->mtab)
  348.       return;
  349.    ((SOMObject*)((void*)this))->somDefaultConstCopyInit(0,((SOMObject*)((void*)fromObj)));
  350. }
  351.  
  352.  
  353. /*
  354.  * Reintroduce inherited methods
  355.  */
  356.  
  357. /* method: somNew */
  358. WPFontPalette*  somNew()
  359. {
  360.    return SOM_ResolveD(this,M_WPFontPalette,SOMClass,somNew)
  361.     (this);
  362. }
  363.  
  364.  
  365.  
  366. };   /* M_WPFontPalette */
  367.  
  368.  
  369.  
  370. #endif       /* SOM_M_WPFontPalette_xh */
  371.