1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00
vdr/menu.h

146 lines
3.7 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.
*
2002-04-13 15:31:41 +02:00
* $Id: menu.h 1.42 2002/04/13 15:31:41 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
2000-05-01 16:29:46 +02:00
#include "dvbapi.h"
2000-02-19 13:36:48 +01:00
#include "osd.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;
void Set(void);
2000-02-19 13:36:48 +01:00
public:
cMenuMain(bool Replaying, eOSState State = osUnknown);
virtual eOSState ProcessKey(eKeys Key);
2000-02-19 13:36:48 +01:00
};
2001-08-03 14:18:08 +02:00
class cDisplayChannel : public cOsdBase {
private:
int group;
bool withInfo;
int lines;
int lastTime;
int oldNumber, number;
void DisplayChannel(const cChannel *Channel);
void DisplayInfo(void);
public:
cDisplayChannel(int Number, bool Switched);
cDisplayChannel(eKeys FirstKey);
virtual ~cDisplayChannel();
virtual eOSState ProcessKey(eKeys Key);
};
2002-03-09 17:11:49 +01:00
class cDisplayVolume : public cOsdBase {
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 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 Del(void);
eOSState Summary(void);
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:
2000-05-01 16:29:46 +02:00
cDvbApi *dvbApi;
2000-04-30 10:22:13 +02:00
cTimer *timer;
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:
2000-05-01 16:29:46 +02:00
cRecordControl(cDvbApi *DvbApi, cTimer *Timer = NULL);
2000-04-30 10:22:13 +02:00
virtual ~cRecordControl();
bool Process(time_t t);
bool Uses(cDvbApi *DvbApi) { return DvbApi == dvbApi; }
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[MAXDVBAPI];
public:
static bool Start(cTimer *Timer = NULL);
static void Stop(const char *InstantId);
static void Stop(cDvbApi *DvbApi);
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);
2000-04-30 10:22:13 +02:00
};
class cReplayControl : public cOsdBase {
2000-04-24 15:32:11 +02:00
private:
2000-05-01 16:29:46 +02:00
cDvbApi *dvbApi;
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);
void Hide(void);
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);
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