/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2008.
     ssss    gggg x   x         Steven Goodwin. All Rights Reserved.
    
This version has been released under the GNU Public License v2.0.

Please see the license files for details.

File: include/sgx/gui/dynamic_image.hpp

*/

#ifndef SGX_CORE_GUI_DYNAMIC_IMAGE_HPP
#define SGX_CORE_GUI_DYNAMIC_IMAGE_HPP	1

class sgxGUIDynamicImageParams {
public:

	sgxGUIDynamicImageParams(const CSGXTexture *pTexture, const CSGXTextureAnimationData *pAnim, const tUINT32 sequence, tUINT32 width=0, tUINT32 height=0, CGUIDesign::tJustify formatX=CGUIDesign::fmtLeftJustify, CGUIDesign::tJustify formatY=CGUIDesign::fmtTopAlignment);

	const CSGXTexture *						m_pTexture;
	const CSGXTextureAnimationData *		m_pAnimationData;
	const CSGXTextureAnimationSequence *	m_pAnimSequence;

			tUINT32 						m_Width;
			tUINT32 						m_Height;
			CGUIDesign::tJustify			m_FormatX;
			CGUIDesign::tJustify			m_FormatY;

};

class sgxGUIDynamicImage : public sgxWidget {
protected:
	sgxGUIDynamicImage(const tINT32 x, const tINT32 y, const sgxGUIDynamicImageParams &params);

	virtual void		getArea(sgxRect2i &rc) const;
	virtual void		update(const tREAL32 telaps);
	virtual tBOOL		draw(const tINT32 offsetX, const tINT32 offsetY) const;

	sgxGUIDynamicImageParams		m_SetupParams;
	sgxGUISkinnedDynamicImage *		m_pSkinParams;
	
	CSGXTextureAnimationState *		m_pAnimState;

	friend class CSGXGUI;
private:
};

#endif /* SGX_CORE_GUI_DYNAMIC_IMAGE_HPP */
