2 Copyright 2005 Brian Walton
\r
4 This file is part of VOMP.
\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
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
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
23 #define WINDOW_WIDTH (150)
\r
24 #define MINUTE_SCALE (3)
\r
30 #include "wselectlist.h"
\r
31 #include "viewman.h"
\r
33 #include "vchannellist.h"
\r
34 #include "command.h"
\r
35 #include "message.h"
\r
38 #include "wtextbox.h"
\r
40 #include "message.h"
\r
41 #include "vvideolive.h"
\r
45 class VEpg : public View
\r
48 VEpg(VVideoLive* v, UINT currentChannel = 0);
\r
50 static VEpg* getInstance();
\r
52 int handleCommand(int command); // deal with commands (from remote control)
\r
53 void draw(); // draw epg view
\r
54 void setCurrentChannel(char* chname);
\r
57 static VEpg* instance;
\r
59 void setInfo(Event* event); // display details of selected programme
\r
60 void drawgrid(); // redraws grid and select programme
\r
63 WSelectList chanListbox; // listbox to display available channels
\r
64 WTextbox progTitle; // area to display time and title of selected programme
\r
65 WTextbox progInfo; // area to display details of selected programme
\r
66 EventList* eventList; // list of events (programmes) for a channel
\r
67 Event thisEvent; // the selected event
\r
68 time_t selTime; // current selection time
\r
69 UINT e; // temp used to point to an event
\r
70 ChannelList* chanList; // list of available channels
\r
71 tm* epgtime; // selected time within epg
\r
72 tm* Ltime; // time of LHS of epg view
\r
73 time_t ltime; // time of LHS of epg view
\r
74 time_t lastEnd; // end time of last painted cell - used to look for gaps in epg
\r
76 EventList* eventLista[7];
\r
79 void updateChanList();
\r
80 void updateEventList();
\r
81 void paintCell(Event* event, int yOffset, Colour bg, Colour fg);
\r
82 time_t prevHour(time_t* t);
\r
83 VVideoLive* videoLive;
\r