/** 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/guidesign.hpp

*/

#ifndef SGX_CORE_GUI_GUIDESIGN_HPP
#define SGX_CORE_GUI_GUIDESIGN_HPP	1

class sgxWidget;

class CGUIDesignScreen {
public:
	typedef enum {
		widgetUnknown,
		//
		widgetFrame,
		widgetImage,
		widgetText,
		widgetButton,
		widgetImageButton,
		widgetHotspot,
		widgetAnimatedImage,
		//
		widgetRadioButton,
		widgetCheckBox,
	} tWidgetType;

	CGUIDesignScreen();
	~CGUIDesignScreen();

	sgxWidget *	addWidget(sgxWidget *pWidget);
	void		releaseScreenWidgets();
	sgxWidget * applyScreen();

protected:
	sgxWidget *						m_pFrame;
	sgxVector<const sgxWidget *>	m_WidgetList;
};

class CGUIDesignAsset  {
};

class CGUIDesignTextureAsset : public CSGXTexture, public CGUIDesignAsset {
};

class CGUIDesignAnimationAsset : public CSGXTextureAnimationData, public CGUIDesignAsset {
};

class CGUIDesign {
public:
	typedef enum {
		// Horizontal formatting
		fmtLeftJustify,
		fmtCentreJustify,
		fmtRightJustify,
		// Vertical formatting
		fmtTopAlignment,
		fmtMiddleAlignment,
		fmtBottomAlignment,
	} tJustify;
	
	typedef enum {
		assetTexture,
		assetAnimation,
	} tAssetType;

	CGUIDesign();
	~CGUIDesign();

	CGUIDesignAsset **	m_pAssetList;
	CGUIDesignScreen **	m_pScreenList;
	tUINT32				m_iNumTextures;
	tUINT32				m_iNumScreens;
	//
	CGUIDesign(const tUINT32 numAssets);
	CGUIDesignScreen *getScreen(const tUINT32 idx) {
		if (idx >= m_iNumScreens) {
			return NULL;
		}
		return m_pScreenList[idx];
	}

	static void adjustPosition(tINT32 &x, tINT32 &y, const tUINT32 w, const tUINT32 h, const tJustify fx, const tJustify fy);
};


#endif /* SGX_CORE_GUI_GUIDESIGN_HPP */
