]> git.vomp.tv Git - vompclient.git/blob - vepg.h
Switch over to updateView rather than show, EPG tweaks
[vompclient.git] / vepg.h
1 /*\r
2     Copyright 2005 Brian Walton\r
3 \r
4     This file is part of VOMP.\r
5 \r
6     VOMP is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; either version 2 of the License, or\r
9     (at your option) any later version.\r
10 \r
11     VOMP is distributed in the hope that it will be useful,\r
12     but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14     GNU General Public License for more details.\r
15 \r
16     You should have received a copy of the GNU General Public License\r
17     along with VOMP; if not, write to the Free Software\r
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
19 */\r
20 \r
21 #ifndef VEPG_H\r
22 #define VEPG_H\r
23 #define WINDOW_WIDTH (150)\r
24 #define MINUTE_SCALE (3)\r
25 #include <stdio.h>\r
26 #include <string.h>\r
27 \r
28 #include "view.h"\r
29 #include "remote.h"\r
30 #include "wselectlist.h"\r
31 #include "viewman.h"\r
32 #include "vdr.h"\r
33 #include "vchannellist.h"\r
34 #include "command.h"\r
35 #include "message.h"\r
36 #include "colour.h"\r
37 #include "video.h"\r
38 #include "wtextbox.h"\r
39 #include "event.h"\r
40 #include "message.h"\r
41 #include "vvideolive.h"\r
42 \r
43 class VVideoLive;\r
44 \r
45 class VEpg : public View\r
46 {\r
47   public:\r
48     VEpg(VVideoLive* v, UINT currentChannel = 0);\r
49     ~VEpg();\r
50 \r
51     int handleCommand(int command); // deal with commands (from remote control)\r
52     void draw(); // draw epg view\r
53     void setCurrentChannel(char* chname);\r
54 \r
55   private:\r
56     void setInfo(Event* event); // display details of selected programme\r
57     void drawgrid(); // redraws grid and select programme\r
58     void drawData();\r
59 \r
60     WSelectList chanListbox; // listbox to display available channels\r
61     WTextbox progTitle; // area to display time and title of selected programme\r
62     WTextbox progInfo; // area to display details of selected programme\r
63     EventList* eventList; // list of events (programmes) for a channel\r
64     Event thisEvent; // the selected event\r
65     time_t selTime; // current selection time\r
66     UINT e; // temp used to point to an event\r
67     ChannelList* chanList; // list of available channels\r
68     tm* epgtime; // selected time within epg\r
69     tm* Ltime; // time of LHS of epg view\r
70     time_t ltime; // time of LHS of epg view\r
71     time_t lastEnd; // end time of last painted cell - used to look for gaps in epg\r
72     WTextbox chanName;\r
73     EventList* eventLista[7];\r
74     int listTop;\r
75     int listWindowSize;\r
76     void updateChanList();\r
77     void updateEventList();\r
78     void paintCell(Event* event, int yOffset, Colour bg, Colour fg);\r
79     time_t prevHour(time_t* t);\r
80     VVideoLive* videoLive;\r
81     ViewMan* viewman;\r
82 };\r
83 \r
84 #endif\r