#ifndef _COMMON_ICONBITMAP_HPP_
#define _COMMON_ICONBITMAP_HPP_
#ifndef _COMMON_PUREBITMAP_HPP_
#include <common/purebmp.hpp>
#endif
#ifndef _COMMON_PUREICON_HPP_
#include <common/pureicon.hpp>
#endif

class IconBitmap
{
public:
	IconBitmap(void);
	IconBitmap(const PureIcon &somePureIcon);
	IconBitmap(const IconBitmap &someIconBitmap);
	virtual ~IconBitmap();
	IconBitmap &operator=(const IconBitmap &someIconBitmap);
	IconBitmap &operator=(const PureIcon &somePureIcon);
	WORD operator==(const IconBitmap &someIconBitmap)const;
	PureBitmap &maskBitmap(void);
	PureBitmap &colorBitmap(void);
private:
	PureBitmap mMaskBitmap;
	PureBitmap mColorBitmap;
};

inline
IconBitmap::IconBitmap(void)
{
}

inline
IconBitmap::IconBitmap(const PureIcon &somePureIcon)
{
  *this=somePureIcon;
}

inline
IconBitmap::IconBitmap(const IconBitmap &someIconBitmap)
{
	*this=someIconBitmap;
}

inline
IconBitmap::~IconBitmap()
{
}

inline
IconBitmap &IconBitmap::operator=(const IconBitmap &someIconBitmap)
{
	mMaskBitmap=someIconBitmap.mMaskBitmap;
	mColorBitmap=someIconBitmap.mColorBitmap;
	return *this;
}

inline
IconBitmap &IconBitmap::operator=(const PureIcon &somePureIcon)
{
	if(somePureIcon.isOkay())
	{
		mMaskBitmap=somePureIcon.maskBitmap();
		mColorBitmap=somePureIcon.colorBitmap();
	}
  return *this;
}

inline
WORD IconBitmap::operator==(const IconBitmap &someIconBitmap)const
{
	return (mMaskBitmap==someIconBitmap.mMaskBitmap&&
          mColorBitmap==someIconBitmap.mMaskBitmap);
}

inline
PureBitmap &IconBitmap::maskBitmap(void)
{
	return mMaskBitmap;
}

inline
PureBitmap &IconBitmap::colorBitmap(void)
{
  return mColorBitmap;
}
#endif
