home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / igbundle.inl < prev    next >
Encoding:
Text File  |  1996-02-22  |  8.2 KB  |  333 lines

  1. #ifndef _IGBUNDLE_INL_
  2. #define _IGBUNDLE_INL_ 0
  3. /*******************************************************************************
  4. * FILE NAME: igbundle.inl                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   This file contains the definition of the inline functions for the          *
  8. *   classes declared in igbundle.hpp.                                          *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   IBM Open Class Library                                                     *
  12. *   (C) Copyright International Business Machines Corporation 1992, 1996       *
  13. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #ifndef _IGBUNDLE_
  19.   #undef  _IGBUNDLE_INL_
  20.   #define _IGBUNDLE_INL_ 1
  21.   #include <igbundle.hpp>
  22. #endif
  23.  
  24. #if _IGBUNDLE_INL_
  25.   #define inline
  26. #endif
  27.  
  28. inline IGraphicBundle& IGraphicBundle::setDrawOperation( DrawOperation drawOperation )
  29. {
  30.   fDrawOp = drawOperation;
  31.   fMask  |= IGraphicBundle::drawOp;
  32.   return *this;
  33. }
  34.  
  35. inline IGraphicBundle::DrawOperation IGraphicBundle::drawOperation ( ) const
  36. {
  37.   return fDrawOp;
  38. }
  39.  
  40. inline IGraphicBundle& IGraphicBundle::resetDrawOperation ( )
  41. {
  42.   fMask &= ~(unsigned long)IGraphicBundle::drawOp;
  43.   return *this;
  44. }
  45.  
  46. inline IBase::Boolean IGraphicBundle::hasDrawOperation ( )  const
  47. {
  48.   return (IBase::Boolean)(fMask & IGraphicBundle::drawOp);
  49. }
  50.  
  51. inline IGraphicBundle& IGraphicBundle::setPenColor( const IColor& penColor )
  52. {
  53.   fPen = penColor;
  54.   fMask |= IGraphicBundle::pColor;
  55.   return *this;
  56. }
  57.  
  58. inline IColor IGraphicBundle::penColor ( ) const
  59. {
  60.   return fPen;
  61. }
  62.  
  63. inline IGraphicBundle& IGraphicBundle::resetPenColor ( )
  64. {
  65.   fMask &= ~(unsigned long)IGraphicBundle::pColor;
  66.   return *this;
  67. }
  68.  
  69. inline IBase::Boolean IGraphicBundle::hasPenColor ( ) const
  70. {
  71.   return (IBase::Boolean)(fMask & IGraphicBundle::pColor);
  72. }
  73.  
  74. inline IGraphicBundle& IGraphicBundle::setFillColor( const IColor& fillColor )
  75. {
  76.   fFill = fillColor;
  77.   fMask |= IGraphicBundle::fColor;
  78.   return *this;
  79. }
  80.  
  81. inline IColor IGraphicBundle::fillColor ( ) const
  82. {
  83.   return fFill;
  84. }
  85.  
  86. inline IGraphicBundle& IGraphicBundle::resetFillColor ( )
  87. {
  88.   fMask &= ~(unsigned long)IGraphicBundle::fColor;
  89.   return *this;
  90. }
  91.  
  92. inline IBase::Boolean IGraphicBundle::hasFillColor ( ) const
  93. {
  94.   return (IBase::Boolean)(fMask & IGraphicBundle::fColor);
  95. }
  96.  
  97. inline IGraphicBundle& IGraphicBundle::setBackgroundColor(
  98.                                                  const IColor& backgroundColor )
  99. {
  100.   fBack = backgroundColor;
  101.   fMask |= IGraphicBundle::bColor;
  102.   return *this;
  103. }
  104.  
  105. inline IColor IGraphicBundle::backgroundColor ( ) const
  106. {
  107.   return fBack;
  108. }
  109.  
  110. inline IGraphicBundle& IGraphicBundle::resetBackgroundColor ( )
  111. {
  112.   fMask &= ~(unsigned long)IGraphicBundle::bColor;
  113.   return *this;
  114. }
  115.  
  116. inline IBase::Boolean IGraphicBundle::hasBackgroundColor ( ) const
  117. {
  118.   return (IBase::Boolean)(fMask & IGraphicBundle::bColor);
  119. }
  120.  
  121. inline IGraphicBundle& IGraphicBundle::setPenWidth( unsigned long width )
  122. {
  123.   fWidth = width;
  124.   fMask |= IGraphicBundle::pWidth;
  125.   return *this;
  126. }
  127.  
  128.  
  129. inline unsigned long IGraphicBundle::penWidth( ) const
  130. {
  131.   return fWidth;
  132. }
  133.  
  134. inline IGraphicBundle& IGraphicBundle::resetPenWidth( )
  135. {
  136.   fMask &= ~(unsigned long)IGraphicBundle::pWidth;
  137.   return *this;
  138. }
  139.  
  140. inline IBase::Boolean IGraphicBundle::hasPenWidth( ) const
  141. {
  142.   return (IBase::Boolean)(fMask & IGraphicBundle::pWidth);
  143. }
  144.  
  145. inline IGraphicBundle& IGraphicBundle::setMixMode( MixMode mixMode )
  146. {
  147.   fMask |= IGraphicBundle::pMix;
  148.   fPmix = mixMode;
  149.   return *this;
  150. }
  151.  
  152. inline IGraphicBundle::MixMode IGraphicBundle::mixMode( ) const
  153. {
  154.   return fPmix;
  155. }
  156.  
  157. inline IGraphicBundle& IGraphicBundle::resetMixMode( )
  158. {
  159.   fMask &= ~(unsigned long)IGraphicBundle::pMix;
  160.   return *this;
  161. }
  162.  
  163. inline IBase::Boolean IGraphicBundle::hasMixMode( ) const
  164. {
  165.   return (IBase::Boolean)(fMask & IGraphicBundle::pMix);
  166. }
  167.  
  168. inline IGraphicBundle& IGraphicBundle::setBackgroundMixMode(
  169.                                            BackgroundMixMode backgroundMixMode )
  170. {
  171.   fMask |= IGraphicBundle::bMix;
  172.   fBmix = backgroundMixMode;
  173.   return *this;
  174. }
  175.  
  176. inline IGraphicBundle::BackgroundMixMode IGraphicBundle::backgroundMixMode( ) const
  177. {
  178.   return fBmix;
  179. }
  180.  
  181. inline IGraphicBundle& IGraphicBundle::resetBackgroundMixMode( )
  182. {
  183.   fMask &= ~(unsigned long)IGraphicBundle::bMix;
  184.   return *this;
  185. }
  186.  
  187. inline IBase::Boolean IGraphicBundle::hasBackgroundMixMode( ) const
  188. {
  189.   return (IBase::Boolean)(fMask & IGraphicBundle::bMix);
  190. }
  191.  
  192. inline IGraphicBundle& IGraphicBundle::setPenType( PenType penType )
  193. {
  194.   fMask |= IGraphicBundle::pType;
  195.   fPtype = penType;
  196.   return *this;
  197. }
  198.  
  199. inline IGraphicBundle::PenType IGraphicBundle::penType( ) const
  200. {
  201.   return fPtype;
  202. }
  203.  
  204. inline IGraphicBundle& IGraphicBundle::resetPenType( )
  205. {
  206.   fMask &= ~(unsigned long)IGraphicBundle::pType;
  207.   return *this;
  208. }
  209.  
  210. inline IBase::Boolean IGraphicBundle::hasPenType( ) const
  211. {
  212.   return (IBase::Boolean)(fMask & IGraphicBundle::pType);
  213. }
  214.  
  215. inline IGraphicBundle& IGraphicBundle::setPenEndingStyle( PenEndingStyle penEndingStyle )
  216. {
  217.   fMask |= IGraphicBundle::pEnd;
  218.   fPend = penEndingStyle;
  219.   return *this;
  220. }
  221.  
  222. inline IGraphicBundle::PenEndingStyle IGraphicBundle::penEndingStyle( ) const
  223. {
  224.   return fPend;
  225. }
  226.  
  227. inline IGraphicBundle& IGraphicBundle::resetPenEndingStyle( )
  228. {
  229.   fMask &= ~(unsigned long)IGraphicBundle::pEnd;
  230.   return *this;
  231. }
  232.  
  233. inline IBase::Boolean IGraphicBundle::hasPenEndingStyle( ) const
  234. {
  235.   return (IBase::Boolean)(fMask & IGraphicBundle::pEnd);
  236. }
  237.  
  238. inline IGraphicBundle& IGraphicBundle::setPenJoiningStyle(
  239.                                                PenJoiningStyle penJoiningStyle )
  240. {
  241.   fMask |= IGraphicBundle::pJoin;
  242.   fPjoin = penJoiningStyle;
  243.   return *this;
  244. }
  245.  
  246. inline IGraphicBundle::PenJoiningStyle IGraphicBundle::penJoiningStyle( ) const
  247. {
  248.   return fPjoin;
  249. }
  250.  
  251. inline IGraphicBundle& IGraphicBundle::resetPenJoiningStyle( )
  252. {
  253.   fMask &= ~(unsigned long)IGraphicBundle::pJoin;
  254.   return *this;
  255. }
  256.  
  257. inline IBase::Boolean IGraphicBundle::hasPenJoiningStyle( ) const
  258. {
  259.   return (IBase::Boolean)(fMask & IGraphicBundle::pJoin);
  260. }
  261.  
  262. inline IGraphicBundle& IGraphicBundle::setPenPattern( unsigned long penPattern )
  263. {
  264.   fMask |= IGraphicBundle::pPat;
  265.   fPpat = penPattern;
  266.   return *this;
  267. }
  268.  
  269. inline unsigned long IGraphicBundle::penPattern( ) const
  270. {
  271.   return fPpat;
  272. }
  273.  
  274. inline IGraphicBundle& IGraphicBundle::resetPenPattern( )
  275. {
  276.   fMask &= ~(unsigned long)IGraphicBundle::pPat;
  277.   return *this;
  278. }
  279.  
  280. inline IBase::Boolean IGraphicBundle::hasPenPattern( ) const
  281. {
  282.   return (IBase::Boolean)(fMask & IGraphicBundle::pPat);
  283. }
  284.  
  285. inline IGraphicBundle& IGraphicBundle::setFillPattern( unsigned long fillPattern )
  286. {
  287.   fMask |= IGraphicBundle::fPat;
  288.   fFpat = fillPattern;
  289.   return *this;
  290. }
  291.  
  292. inline unsigned long IGraphicBundle::fillPattern( ) const
  293. {
  294.   return fFpat;
  295. }
  296.  
  297. inline IGraphicBundle& IGraphicBundle::resetFillPattern( )
  298. {
  299.   fMask &= ~(unsigned long)IGraphicBundle::fPat;
  300.   return *this;
  301. }
  302.  
  303. inline IBase::Boolean IGraphicBundle::hasFillPattern( ) const
  304. {
  305.   return (IBase::Boolean)(fMask & IGraphicBundle::fPat);
  306. }
  307.  
  308. inline IGraphicBundle& IGraphicBundle::setPatternOrigin( const IPoint& pt )
  309. {
  310.   fOrg = pt;
  311.   fMask |= IGraphicBundle::pOrg;
  312.   return *this;
  313. }
  314.  
  315. inline IPoint IGraphicBundle::patternOrigin( ) const
  316. {
  317.   return fOrg;
  318. }
  319.  
  320. inline IGraphicBundle& IGraphicBundle::resetPatternOrigin( )
  321. {
  322.   fMask &= ~(unsigned long)IGraphicBundle::pOrg;
  323.   return *this;
  324. }
  325.  
  326. inline IBase::Boolean IGraphicBundle::hasPatternOrigin( ) const
  327. {
  328.   return (IBase::Boolean)(fMask & IGraphicBundle::pOrg);
  329. }
  330.  
  331.  
  332. #endif // _IGBUNDLE_INL_
  333.