//================================================================
//
//	Name : RYLImageCaninet.h 
//	Desc : RYL UI Default Image Manager Class
//  Date : 2003. 09. 19
//
//================================================================
#ifndef __RYLIMAGECAVINET_H__
#define __RYLIMAGECAVINET_H__

#include "GMObject.h"

#include <vector>
using namespace std ;

class CRYLImage ;
class CGMFileStream ;

class CRYLImageCabinet : public CGMObject
{
public:

	VOID Clear() ;

	enum EDefaultCtrlType
	{
		EDCT_BUTTON_NORMAL,
		EDCT_BUTTON_DOWN,
		EDCT_BUTTON_UP,
		EDCT_BUTTON_DISIBLE,
		EDCT_BUTTON_CHECK_DISIBLE,
		EDCT_BUTTON_NCHECK_DISIBLE,

		EDCT_TAB_BUTTON_OPEN,
		EDCT_TAB_BUTTON_CLOSE,

		EDCT_TAB_BUTTON_LEFT_OPEN,
		EDCT_TAB_BUTTON_LEFT_CLOSE,
		EDCT_TAB_BUTTON_RIGHT_OPEN,
		EDCT_TAB_BUTTON_RIGHT_CLOSE,
		EDCT_TAB_BUTTON_CENTER_OPEN,
		EDCT_TAB_BUTTON_CENTER_CLOSE,
		EDCT_TAB_BUTTON_SPACER,

		EDCT_CAPTION_CLOSE_BUTTON_UP,
		EDCT_CAPTION_CLOSE_BUTTON_DOWN,
		EDCT_CAPTION_CLOSE_BUTTON_DISIBLE,
		EDCT_CAPTION_CLOSE_BUTTON_ENTER,

		EDCT_CAPTION_MINI_BUTTON_UP,
		EDCT_CAPTION_MINI_BUTTON_DOWN,
		EDCT_CAPTION_MINI_BUTTON_DISIBLE,
		EDCT_CAPTION_MINI_BUTTON_ENTER,

		EDCT_SMALL_BUTTON_UP,
		EDCT_SMALL_BUTTON_DOWN,
		EDCT_SMALL_BUTTON_DISIBLE,
		EDCT_SMALL_BUTTON_ENTER,

		EDCT_COMBOBOX_BUTTON_UP,
		EDCT_COMBOBOX_BUTTON_DOWN,
		EDCT_COMBOBOX_BUTTON_DISIBLE,
		EDCT_COMBOBOX_BUTTON_ENTER,

		EDCT_CHECKBOX_BUTTON_UP,
		EDCT_CHECKBOX_BUTTON_DOWN,
		EDCT_CHECKBOX_BUTTON_DISIBLE,
		EDCT_CHECKBOX_BUTTON_ENTER,

		EDCT_LISTBOX_TOP_BUTTON_NORMAL,
		EDCT_LISTBOX_TOP_BUTTON_DOWN,
		EDCT_LISTBOX_TOP_BUTTON_UP,
		EDCT_LISTBOX_TOP_BUTTON_DISIBLE,

		EDCT_LISTBOX_BOTTOM_BUTTON_NORMAL,
		EDCT_LISTBOX_BOTTOM_BUTTON_DOWN,
		EDCT_LISTBOX_BOTTOM_BUTTON_UP,
		EDCT_LISTBOX_BOTTOM_BUTTON_DISIBLE,

		EDCT_LISTBOX_TRACK_BUTTON_NORMAL,
		EDCT_LISTBOX_TRACK_BUTTON_DOWN,
		EDCT_LISTBOX_TRACK_BUTTON_UP,
		EDCT_LISTBOX_TRACK_BUTTON_DISIBLE,

		EDCT_IMEVIEW_LEFT_BUTTON_UP,
		EDCT_IMEVIEW_LEFT_BUTTON_DOWN,
		EDCT_IMEVIEW_LEFT_BUTTON_DISIBLE,
		EDCT_IMEVIEW_LEFT_BUTTON_ENTER,

		EDCT_IMEVIEW_RIGHT_BUTTON_UP,
		EDCT_IMEVIEW_RIGHT_BUTTON_DOWN,
		EDCT_IMEVIEW_RIGHT_BUTTON_DISIBLE,
		EDCT_IMEVIEW_RIGHT_BUTTON_ENTER,

		EDCT_EDIT_Line,
		EDCT_EDIT_ENTER,
		EDCT_FORM_CAPTION,
		EDCT_FORM_WINDOW,
	};

	CRYLImageCabinet() ;
	virtual ~CRYLImageCabinet() ;

	VOID		GetRYLImage( INT Index, CRYLImage **ppOutImage ) ;
	CRYLImage*	GetRYLImage( INT Index ) ;
	CRYLImage*	GetRYLImage( LPSTR pFileName ) ;
	CRYLImage*	GetRYLImage( INT Width, INT Height, EDefaultCtrlType CtrlType, DWORD dwClearColor = 0xFFFFFFFF ) ;
	CRYLImage*	GetRYLImage( INT Width, INT Height, DWORD dwClearColor = 0xFFFFFFFF ) ;
	
	VOID		SetRYLImage( INT Index, CRYLImage* pRYLImage ) ;
	VOID		AddRYLImage( CRYLImage* pRYLImage ) ;
	VOID		DeleteRYLImage( INT Index ) ;
	VOID		DeleteRYLImage( CRYLImage* pRYLImage ) ;

	INT			GetCount() ;
	LPSTR		GetFileName() ;

	virtual VOID LoadFromFile( LPSTR pFileName ) ;	
	virtual VOID LoadFromStream( CGMFileStream* pStream ) ;	

private:

	LPSTR	                    pszFileName ;
	std::vector < CRYLImage* >  m_ImageList ;
};

#endif