#ifndef _COMMON_OWNERDRAWLISTCHECK_HPP_
#define _COMMON_OWNERDRAWLISTCHECK_HPP_
#ifndef _COMMON_BRUSH_HPP_
#include <common/brush.hpp>
#endif
#ifndef _COMMON_BLOCK_HPP_
#include <common/block.hpp>
#endif
#ifndef _COMMON_OWNERDRAWLIST_HPP_
#include <common/odlist.hpp>
#endif

class PureBitmap;

class OwnerDrawListCheck : public OwnerDrawList
{
public:
  OwnerDrawListCheck(GUIWindow &parentWnd,HWND hControlWnd,UINT controlID,const PureBitmap &selected,const PureBitmap &unselected);
  OwnerDrawListCheck(GUIWindow &parentWnd,const Rect &initRect,int controlID,const PureBitmap &selected,const PureBitmap &unselected,DWORD style=LBS_NOTIFY|WS_BORDER|LBS_HASSTRINGS|WS_VSCROLL|LBS_OWNERDRAWFIXED|WS_CLIPCHILDREN|WS_CLIPSIBLINGS);
	virtual ~OwnerDrawListCheck();
	OwnerDrawListCheck &operator=(const OwnerDrawListCheck &someOwnerDrawListCheck);
protected:
  virtual WORD handleDraw(const DrawItem &drawItem);
	virtual WORD handleMeasureItem(MeasureItem &measureItem);
	virtual LPARAM handleControlColor(PureDevice &pureDevice,Control &wndListBox);
  virtual void drawEntire(const DrawItem &drawItem);
private:
  enum {BmSel=0,BmUnSel=1};
	Block<PureBitmap> mPureBitmaps;
	RGBColor mRGBGray;
	Brush mGrayBrush;
  Brush mDisabledBrush;
};
#endif