#ifndef __EPGSEARCH_MENUWHATSON_H
#define __EPGSEARCH_MENUWHATSON_H

#include <vdr/menuitems.h>
#include "epgsearchcfg.h"

// --- cMenuWhatsOnSearchItem ------------------------------------------------------

class cMenuWhatsOnSearchItem : public cOsdItem {
public:
  const cEvent *event;
  const cChannel *channel;
  cMenuWhatsOnSearchItem(const cEvent *Event, cChannel *Channel, int iProgress=0, showMode ShowMode = showNow);
};

// --- cMenuWhatsOnSearch ----------------------------------------------------------

class cMenuWhatsOnSearch : public cOsdMenu {
private:
    const cSchedules* schedules;
  eOSState Record(void);
  eOSState ExtendedSearch(void);
  static int currentChannel;
  static const cEvent *scheduleEvent;
public:
  static showMode currentShowMode;
  int shiftTime;
  time_t GetTimeT(int iTime);
  showMode GetNextMode();
  cMenuWhatsOnSearch(const cSchedules *Schedules, int CurrentChannelNr);
  ~cMenuWhatsOnSearch();
  void LoadSchedules();
  static int CurrentChannel(void) { return currentChannel; }
  static void SetCurrentChannel(int ChannelNr) { currentChannel = ChannelNr; }
  static const cEvent *ScheduleEvent(void);
  virtual eOSState ProcessKey(eKeys Key); 
  virtual eOSState Switch(void);
  virtual eOSState Shift(int); 
  virtual eOSState Commands(eKeys Key);
  virtual eOSState ShowSummary();
  void SetHelpKeys();
  int GetTab(int Tab);
  };

#endif
