]> git.vomp.tv Git - vompclient.git/blob - vepglistadvanced.h
Fix subs running during pause - after a jump then quick pause
[vompclient.git] / vepglistadvanced.h
1 /*
2     Copyright 2004-2020 Chris Tallon, 2014 Marten Richter
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP.  If not, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef VEPGLIST_ADVANCED_H
21 #define VEPGLIST_ADVANCED_H
22
23 #include <stack>
24 #include <memory>
25
26 #include "tbboxx.h"
27 #include "messagequeue.h"
28 #include "wtextbox.h"
29 #include "wselectlist.h"
30 #include "wtvmedia.h"
31
32 class BoxStack;
33
34 class VEpgListAdvanced : public TBBoxx, public MessageReceiver
35 {
36   public:
37     VEpgListAdvanced(MessageReceiver* tvideolive, std::shared_ptr<ChannelList> tchanList, ULONG initialChannelNumber);
38     virtual ~VEpgListAdvanced();
39
40     void draw() { draw(false); }
41     void draw(bool);
42     bool load();
43     void drawData(bool doIndexPop = false);
44
45   protected:
46
47     enum EpgMode
48     {
49       OneChannel,
50       Now,
51       Next
52     };
53
54     enum EpgMode mode;
55
56     void quickUpdate();
57     void updateSelection();
58
59     void setButtonText();
60
61     void clearEventList();
62
63     void updateEpgData();
64     void updateEpgDataChannel();
65     void updateEpgDataNowNext(bool changestate);
66     void drawDataChannel(bool doIndexPop);
67     void drawDataNowNext(bool next, bool doIndexPop);
68
69     int handleCommand(int command);
70     void processMessage(Message* m);
71
72     void doRed();
73     void doGreen();
74     void doYellow();
75     void doBlue();
76
77     void doNext();
78     void doNow();
79     void doProgramm();
80     void doSwitch();
81     void doRecord();
82     void doGrid();
83
84     WTextbox epg;
85     WTVMedia epgTVmedia;
86
87     BoxStack* boxstack;
88     bool loading;
89
90     WSelectList sl;
91
92     Event* getCurrentOptionEvent(ULONG& channel);
93
94     std::shared_ptr<ChannelList> chanList;
95     ULONG channelNumber;
96     MessageReceiver* videolive;
97
98     Boxx boxRed;
99     Boxx boxGreen;
100     Boxx boxYellow;
101     Boxx boxBlue;
102
103     WTextbox textRed;
104     WTextbox textGreen;
105     WTextbox textYellow;
106     WTextbox textBlue;
107
108     std::vector<EventList*> eventLista;
109 };
110
111 #endif