summaryrefslogtreecommitdiff
path: root/osdmenu.h
blob: 37de7149fb18ba5e4e1e4441b9f355b9bb0b7b9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef OSDMENU_H_
#define OSDMENU_H_

#include <vdr/menu.h>
#include "neutrinoepg.h"

extern time_t t;
extern int MaxGroup;
extern int *CurrentGroupChannel;
extern int *FirstGroupChannel;
extern int *LastGroupChannel;

// --- myMenuWhatsOn ----------------------------------------------------------
class myOsdMenu : public cOsdMenu
{
    private:
        bool next, jumpto;
        char tmp[16];
        
        int GroupCount;
        int ChannelCount;

        int ChannelsShown;
        int ChannelsBefore;
        int ChannelsAfter;
        int CurrentGroup;

        int hh, mm, index;
        const cSchedules *schedules;
        cSchedulesLock schedulesLock;

        void LoadSchedules(int shift);
        void GoToDay(int day);
        void JumpTo(int hh,int mm);
        void SetMyTitle(void);
        eOSState Switch();
        int Tab(){if(Setup.UseSmallFont==2)return 5;else return 6;}

        int GetGroupIndex(int Group);
        int GetGroupByGroupIndex(int GroupIndex);
        int GetGroupFromChannel(int ChanIndex);
        int GetLastGroupIndex(void);
        int GetFirstGroupIndex(void);
        int GetFirstChannelOfGroup(int Group);
        int GetLastChannelOfGroup(int Group);
        int GetNextChannel(int ChanIndex);
        int GetPrevChannel(int ChanIndex);
        bool isChannelInGroup(int ChanIndex, int Group);
        bool ChannelsHasGroup(void);
        bool FirstChannelsHasGroup(void);

    public:
        myOsdMenu();
        ~myOsdMenu();
        virtual eOSState ProcessKey(eKeys Key);
};

#endif