#pragma once

#include "dllinterface.h"
#include "guielement.h"
#include "..\Utilities\XString.h"

//-----------------------------------------------------------------------------
//Name: Menu
//Desc:	a container of elements, itselft has no object that were drawn
//		it handles all the events raised by its childs
//		the best way to build an interactive menu is to derive your own class 
//		from this handle the events
//-----------------------------------------------------------------------------

class GAMEGUI_API Menu : public GUIElement
{
	XString	m_Name;
	LList<GUIElement> m_TabList;

protected:
	friend LList<Menu>;
	friend ListElement<Menu>;
	friend GUIElement;
	
	void AddTabEntry(GUIElement*el);
	void DelTabEntry(GUIElement*el);

	virtual ~Menu(void);

public:
	Menu(MenuManager*manager,DWORD id);
		
	XString GetName(void){return m_Name;}
	void SetName(const XString &name){m_Name = name;}

//	virtual void OnEvent(DWORD id,GUIEVENT evnt,DWORD param){}

	void FocusNext(DWORD tabindex);
};
