/**
 * osd_userinterface.h: OSD userinterface
 * 
 * Can display textbased or graphical OSD, depends on user setting.
 * 
 * Copyright: See COPYING file that comes with this distribution
 *
 * Author: Matthias Feistel <hitman_47@users.sourceforge.net>, (C) 2006, 2007
 */

#ifndef USERINTERFACE_H
#define USERINTERFACE_H

#include <vdr/osdbase.h>
#include <vdr/thread.h>
#include "osd_osdtools.h"
#include "web_serviceconnector.h"
#include "web_metadata.h"
#include "osd_userinterface_submenu.h"

class cUserInterface : public cOsdObject, cThread
{
private:
	cOsd *osd;
	cOsdTools *OsdTools;
	cWebServiceConnector *WebServiceConnector; // fuer Metadata
	cMetaData meta;
	cUserInterface_Submenu *UserInterface_SearchActions;
protected:
	void BuildMenu( void );
	virtual void Action( void );
public:
	cUserInterface( void );
	~cUserInterface( );
	virtual void Show( void );
	virtual eOSState ProcessKey( eKeys Key );
private:
	// Osd_Tools:
	int m_Osd_Width;
	int m_Osd_Height;
	int m_Osd_ColourDepth;
	int m_Osd_AreaDepth;
	int m_Osd_Centre_x;
	int m_Osd_Centre_y;
	int m_Osd_BitmapSize_x;
	int m_Osd_BitmapSize_y;
	int m_Osd_ImgAlpha;
	int m_Osd_BtnWidth;
	int m_Osd_FontHeight;
};

class cUserInterfaceTextbased : public cOsdMenu, cThread
{
private:
	cWebServiceConnector *WebServiceConnector; // fuer Metadata
	cMetaData meta;
	cUserInterface_Submenu *UserInterface_SearchActions;
protected:
	void BuildMenu( void );
	virtual void Action( void );
public:
	cUserInterfaceTextbased( void );
	~cUserInterfaceTextbased( );
	virtual eOSState ProcessKey( eKeys Key );
private:
	virtual eOSState OnBlue( void );
};

#endif // USERINTERFACE_H
