#ifndef __WNDMESSAGELIST_H
#define __WNDMESSAGELIST_H

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

#include <libicq2000/Client.h>
#include "Window.h"

class cVdrIcqOsd;
class SimpleClient;
class MessageQueue;
class cStatusbarWnd;


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

  tArea GetArea1(void);
  tArea GetArea2(void);
	void Clear(void);
  void Draw(void);
  eOSState ProcessKey(eKeys Key);
  void SetHelpKeys(void);
	void SetMessageList(MessageQueue *pMessageQueue);
  void ZeilenumbruecheEinfuegen(std::string &message);

  void ShowContactDetails(ICQ2000::ContactRef c);
  void ShowMessage(std::string sMessage);
  void HiddeForegroundMessage(void);
  bool ForegroundMessageVisible() { return m_bShowForegroundMessage; }

private:
  tArea                 m_Area1;
  tArea                 m_Area2;
  cOsd                  *m_pOsd;
  MessageQueue          *m_pMessageQueue;
  int                   m_iScrolldiff;
  cVdrIcqOsd            *m_pVdrIcqOsd;
  SimpleClient          *m_pIcqClient;
  cStatusbarWnd         *m_pStatusbarWnd;
  bool                  m_boolLastRowVisible;
  bool                  m_bShowForegroundMessage;
};


#endif // __WNDMESSAGELIST_H
