/** SGX

The   sss    gggg x   x   
     s      g      x x    Engine
      sss   g  gg   x
         s  g   g  x x          Copyright 1995-2009.
     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: sgx/include/sgx/gui/imagebutton.hpp

*/

#ifndef SGX_CORE_GUI_IMAGE_BUTTON_HPP
#define SGX_CORE_GUI_IMAGE_BUTTON_HPP	1

class sgxGUIImageButtonParams {
public:
	sgxGUISkinnedImageButton::tButtonType		m_Type;
	const CSGXTexture *							m_pCustomTexture;		// used only with custom types
	tUINT32										m_iCustomRegion;

	sgxGUIImageButtonParams(const CSGXTexture *pTexture, const tUINT32 region);
	sgxGUIImageButtonParams(const sgxGUISkinnedImageButton::tButtonType type=sgxGUISkinnedImageButton::eRight);
	
	static tUINT32	DEFAULT_WIDTH;
	static tUINT32	DEFAULT_HEIGHT;
};

class sgxGUIImageButton : public sgxWidget {
public:
	const static tUINT32	DEFAULT_WIDTH = 48;
	const static tUINT32	DEFAULT_HEIGHT = 48;

	virtual void	getArea(sgxRect2i &rc) const;
	virtual tBOOL	draw(CSGXDrawSurface *pSurface, const tINT32 offsetX, const tINT32 offsetY) const;

protected:
	sgxGUIImageButton(const tINT32 x, const tINT32 y, const sgxGUIImageButtonParams &params);

	sgxGUIImageButtonParams		m_SetupParams;
	sgxGUISkinnedImageButton *	m_pSkinParams;

	friend class CSGXGUI;
};

#endif /* SGX_CORE_GUI_IMAGE_BUTTON_HPP */
