/** 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/utils/menusystem/menu.hpp

*/

#ifndef SGX_UTILS_MENUSYSTEM_MENU_HPP
#define SGX_UTILS_MENUSYSTEM_MENU_HPP	1


class CGameMenuHandler;
class sgxWidget;

class sgxGameMenuCallbackHandler {
public:
	virtual tBOOL onGameMenuPrepareMenu(CGameMenuHandler *pHandler);
	virtual tBOOL onGameMenuGetCaptionPosition(const CGameMenuHandler *p, sgxPoint2i &pos, const char *pCaption) const;
	virtual tBOOL onGameMenuGetWidgetPosition(const CGameMenuHandler *p, sgxPoint2i &pos, const tUINT32 idx, const sgxWidget *pWidget) const;
	virtual tBOOL onGameMenuDrawMenu(const CGameMenuHandler *pHandler) const;
	virtual tBOOL onGameMenuUpdate(CGameMenuHandler *pHandler, const tREAL32 telaps);
	virtual tBOOL onGameMenuOptionSelect(CGameMenuHandler *pHandler, const tINT32 opt);
};


class CSGXMenu : public sgxGameMenuCallbackHandler {
public:
	// Following the rule of 3, for each phase of the menu's life
	virtual void 	beginEntrance(CGameMenuHandler *p);
	virtual tBOOL 	updateEntrance(CGameMenuHandler *p, const tREAL32 telaps);
	virtual void 	endEntrance(CGameMenuHandler *p);
	
	virtual void 	updateActive(CGameMenuHandler *p, const tREAL32 telaps);

	virtual void 	beginExit(CGameMenuHandler *p);
	virtual tBOOL 	updateExit(CGameMenuHandler *p, const tREAL32 telaps) ;
	virtual void 	endExit(CGameMenuHandler *p);
};

#endif

