vdr/menu.h

179 lines
4.5 KiB
C
Raw Normal View History

2000-02-19 13:36:48 +01:00
/*
* menu.h: The actual menu implementations
*
2000-04-24 09:46:05 +02:00
* See the main source file 'vdr.c' for copyright information and
2000-02-19 13:36:48 +01:00
* how to reach the author.
*
* $Id: menu.h 1.53 2003/01/12 14:54:05 kls Exp $
2000-02-19 13:36:48 +01:00
*/
2002-04-13 15:31:41 +02:00
#ifndef __MENU_H
#define __MENU_H
2000-02-19 13:36:48 +01:00
#include "ci.h"
#include "device.h"
2000-02-19 13:36:48 +01:00
#include "osd.h"
#include "dvbplayer.h"
#include "recorder.h"
#include "recording.h"
2000-02-19 13:36:48 +01:00
class cMenuMain : public cOsdMenu {
2000-05-01 16:29:46 +02:00
private:
time_t lastActivity;
bool replaying;
2002-11-24 10:45:39 +01:00
static cOsdObject *pluginOsdObject;
void Set(const char *Plugin = NULL);
2000-02-19 13:36:48 +01:00
public:
cMenuMain(bool Replaying, eOSState State = osUnknown, const char *Plugin = NULL);
virtual eOSState ProcessKey(eKeys Key);
2002-11-24 10:45:39 +01:00
static cOsdObject *PluginOsdObject(void);
2000-02-19 13:36:48 +01:00
};
2001-08-03 14:18:08 +02:00
class cDisplayChannel : public cOsdObject {
private:
int group;
bool withInfo;
int lines;
int lastTime;
2002-09-29 13:40:45 +02:00
int number;
void DisplayChannel(const cChannel *Channel);
void DisplayInfo(void);
2002-10-27 14:32:06 +01:00
void Refresh(void);
public:
cDisplayChannel(int Number, bool Switched);
cDisplayChannel(eKeys FirstKey);
virtual ~cDisplayChannel();
virtual eOSState ProcessKey(eKeys Key);
};
class cDisplayVolume : public cOsdObject {
2002-03-09 17:11:49 +01:00
private:
int timeout;
static cDisplayVolume *displayVolume;
void Show(void);
cDisplayVolume(void);
public:
virtual ~cDisplayVolume();
static cDisplayVolume *Create(void);
static void Process(eKeys Key);
eOSState ProcessKey(eKeys Key);
};
class cMenuCam : public cOsdMenu {
private:
cCiMenu *ciMenu;
bool selected;
eOSState Select(void);
public:
cMenuCam(cCiMenu *CiMenu);
virtual ~cMenuCam();
virtual eOSState ProcessKey(eKeys Key);
};
class cMenuCamEnquiry : public cOsdMenu {
private:
cCiEnquiry *ciEnquiry;
char *input;
bool replied;
eOSState Reply(void);
public:
cMenuCamEnquiry(cCiEnquiry *CiEnquiry);
virtual ~cMenuCamEnquiry();
virtual eOSState ProcessKey(eKeys Key);
};
cOsdObject *CamControl(void);
class cMenuRecordingItem;
class cMenuRecordings : public cOsdMenu {
private:
static cRecordings Recordings;
char *base;
int level;
static int helpKeys;
void SetHelpKeys(void);
cRecording *GetRecording(cMenuRecordingItem *Item);
bool Open(bool OpenSubMenus = false);
eOSState Play(void);
eOSState Rewind(void);
eOSState Delete(void);
eOSState Summary(void);
2002-10-13 12:14:49 +02:00
eOSState Commands(eKeys Key = kNone);
public:
cMenuRecordings(const char *Base = NULL, int Level = 0, bool OpenSubMenus = false);
~cMenuRecordings();
virtual eOSState ProcessKey(eKeys Key);
};
2000-05-01 16:29:46 +02:00
class cRecordControl {
2000-04-30 10:22:13 +02:00
private:
cDevice *device;
2000-04-30 10:22:13 +02:00
cTimer *timer;
cRecorder *recorder;
const cEventInfo *eventInfo;
2000-05-01 16:29:46 +02:00
char *instantId;
char *fileName;
bool GetEventInfo(void);
2000-04-30 10:22:13 +02:00
public:
cRecordControl(cDevice *Device, cTimer *Timer = NULL);
2000-04-30 10:22:13 +02:00
virtual ~cRecordControl();
bool Process(time_t t);
bool Uses(cDevice *Device) { return Device == device; }
void Stop(bool KeepInstant = false);
2000-05-01 16:29:46 +02:00
bool IsInstant(void) { return instantId; }
const char *InstantId(void) { return instantId; }
const char *FileName(void) { return fileName; }
cTimer *Timer(void) { return timer; }
2000-05-01 16:29:46 +02:00
};
class cRecordControls {
private:
static cRecordControl *RecordControls[];
2000-05-01 16:29:46 +02:00
public:
static bool Start(cTimer *Timer = NULL);
static void Stop(const char *InstantId);
static void Stop(cDevice *Device);
static bool StopPrimary(bool DoIt = false);
2000-05-01 16:29:46 +02:00
static const char *GetInstantId(const char *LastInstantId);
static cRecordControl *GetRecordControl(const char *FileName);
static void Process(time_t t);
static bool Active(void);
static void Shutdown(void);
2000-04-30 10:22:13 +02:00
};
class cReplayControl : public cDvbPlayerControl {
2000-04-24 15:32:11 +02:00
private:
2000-12-28 12:57:16 +01:00
cMarks marks;
2001-09-14 14:06:43 +02:00
bool visible, modeOnly, shown, displayFrames;
int lastCurrent, lastTotal;
time_t timeoutShow;
bool timeSearchActive, timeSearchHide;
int timeSearchTime, timeSearchPos;
void TimeSearchDisplay(void);
void TimeSearchProcess(eKeys Key);
void TimeSearch(void);
void Show(int Seconds = 0);
static char *fileName;
static char *title;
void DisplayAtBottom(const char *s = NULL);
void ShowMode(void);
2000-12-09 11:13:00 +01:00
bool ShowProgress(bool Initial);
2000-12-28 12:57:16 +01:00
void MarkToggle(void);
void MarkJump(bool Forward);
void MarkMove(bool Forward);
void EditCut(void);
void EditTest(void);
2000-04-23 15:38:16 +02:00
public:
cReplayControl(void);
virtual ~cReplayControl();
virtual eOSState ProcessKey(eKeys Key);
virtual void Hide(void);
bool Visible(void) { return visible; }
static void SetRecording(const char *FileName, const char *Title);
static const char *LastReplayed(void);
static void ClearLastReplayed(const char *FileName);
2000-04-23 15:38:16 +02:00
};
2002-04-13 15:31:41 +02:00
#endif //__MENU_H