/*
 * directorosd.c: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */

#ifndef __DIRECTOROSD_H
#define __DIRECTOROSD_H

#include <vdr/plugin.h>
#include <vdr/status.h>
#include <vdr/tools.h>

#include "arghdirector.h"

class cDirectorOsd : public cThread, public cOsdObject 
{

   public:

      cDirectorOsd(cMenuDirectorData* data);
      ~cDirectorOsd();
      virtual void Show(void);
      virtual eOSState ProcessKey(eKeys Key);
  
      void CursorUp();
      void CursorDown();
      void CursorLeft();
      void CursorRight();
      void CursorOK();
      void ChannelDown();
      void ChannelUp();

   protected:

      virtual void Action(void);

   private:

      const cFont *font;
      char *channelname;
	
      bool isOsdShowing;
      cOsd *osd;
      cChannel *Channel;
      int number;
      int lastChannel;
      int current;
      bool m_Active;
      tColor bgColor;
      tColor green;
      tColor lightgrey;
      tColor bgClear;
      int last_gr_width;
      time_t lastkeytime;
      cMenuDirectorData* mData;

      cChannel* getChannel(int channelnumber);
      void SwitchtoChannel(int channelnumber);
      int getNumLinks();
      tColor toColor(int r, int g, int b, int t);
      void clearOsd(void);
      void drawOsd(void);
      void drawRect(int x, int y, int width, int height, tColor colorvalue);
};

#endif //__DIRECTOROSD_H
