#ifndef __WNDSTATUSBAR_H
#define __WNDSTATUSBAR_H


#include <vdr/osd.h>
#include <vdr/menuitems.h>
#include "Window.h"

class cVdrIcqOsd;


class cStatusbarWnd : public cWnd, public cThread
{
public:
	cStatusbarWnd(int iLeft, int iTop, int iWidth, int iHeight, int iBpP, cOsd *pOsd, cVdrIcqOsd *pVdrIcqOsd);
	~cStatusbarWnd();

  tArea GetArea1(void);
  tArea GetArea2(void);
  eOSState ProcessKey(eKeys Key);
	void SetButtons(const char *pRed, const char *pGreen = NULL, const char *pYellow = NULL, 
                  const char *pBlue = NULL);
  void Message(eMessageType MessageType, const char *pMessage, int iSeconds = 5);
  bool Confirm(const char *pMessage, int iSeconds = 10, bool WaitForTimeout = false);
  bool IsDefaulMenu(void) { return m_bDefaulMenu; }
  void ShowDefaultButtons(void);

  bool WaitForConfirming() { return m_bWaitForConfirming; }
  
private:
  tArea   m_Area1;
  tArea   m_Area2;
  cOsd  *m_pOsd;
  bool    m_bMessage;
  bool    m_bInAction;
  time_t  m_Timeout;
  bool    m_bDefaulMenu;
  const char *m_pRed;
  const char *m_pGreen;
  const char *m_pYellow;
  const char *m_pBlue;
  cVdrIcqOsd *m_pVdrIcqOsd;
  bool       m_bWaitForConfirming;

  void DrawButtons(void);

protected:
	virtual void Action(void);
};


#endif // __WNDSTATUSBAR_H
