2 Copyright 2005 Brian Walton
4 This file is part of VOMP.
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.
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.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #define WINDOW_WIDTH (150)
24 #define MINUTE_SCALE (3)
30 #include "wselectlist.h"
33 #include "vchannellist.h"
41 #include "vvideolive.h"
42 #include "vepgsettimer.h"
46 class VEpg : public View
49 VEpg(VVideoLive* v, UINT currentChannel = 0);
51 static VEpg* getInstance();
53 int handleCommand(int command); // deal with commands (from remote control)
54 void draw(); // draw epg view
55 void setCurrentChannel(char* chname);
58 static VEpg* instance;
60 void setInfo(Event* event); // display details of selected programme
61 void drawgrid(); // redraws grid and select programme
64 WSelectList chanListbox; // listbox to display available channels
65 WTextbox progTitle; // area to display time and title of selected programme
66 WTextbox progInfo; // area to display details of selected programme
67 EventList* eventList; // list of events (programmes) for a channel
68 Event thisEvent; // the selected event
69 time_t selTime; // current selection time
70 UINT e; // temp used to point to an event
71 ChannelList* chanList; // list of available channels
72 tm* epgtime; // selected time within epg
73 tm* Ltime; // time of LHS of epg view
74 time_t ltime; // time of LHS of epg view
75 time_t lastEnd; // end time of last painted cell - used to look for gaps in epg
77 EventList* eventLista[7];
80 void updateChanList();
81 void updateEventList();
82 void paintCell(Event* event, int yOffset, Colour bg, Colour fg);
83 time_t prevHour(time_t* t);
84 VVideoLive* videoLive;