parent = newParent;\r
}\r
\r
-void Boxx::setBackgroundColour(const Colour& Tcolour)\r
+void Boxx::setBackgroundColour(const DrawStyle& Tcolour)\r
{\r
backgroundColour = Tcolour;\r
backgroundColourSet = true;\r
\r
// Level 1 drawing functions\r
\r
-void Boxx::fillColour(const Colour& colour)\r
+void Boxx::fillColour(const DrawStyle& colour)\r
{\r
rectangle(0, 0, area.w, area.h, colour);\r
}\r
\r
-void Boxx::drawPara(const char* text, int x, int y, const Colour& colour)\r
+void Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour)\r
{\r
char line[256];\r
int lineHeight = getFontHeight() + paraVSpace;\r
}\r
}\r
\r
-void Boxx::rectangle(Region& region, const Colour& colour)\r
+void Boxx::rectangle(Region& region, const DrawStyle& colour)\r
{\r
rectangle(region.x, region.y, region.w, region.h, colour);\r
}\r
\r
// Level 0 drawing functions\r
\r
-void Boxx::rectangle(UINT x, UINT y, UINT w, UINT h, const Colour& colour)\r
+void Boxx::rectangle(UINT x, UINT y, UINT w, UINT h, const DrawStyle& colour)\r
{\r
if (parent) parent->rectangle(area.x + x, area.y + y, w, h, colour);\r
- else surface->fillblt(x, y, w, h, colour.rgba());\r
+ else surface->fillblt(x, y, w, h, colour);\r
}\r
\r
-void Boxx::drawText(const char* text, int x, int y, const Colour& colour)\r
+void Boxx::drawText(const char* text, int x, int y, const DrawStyle& colour)\r
{\r
if (parent) parent->drawText(text, area.x + x, area.y + y, colour);\r
- else surface->drawText(text, x, y, colour.rgba());\r
+ else surface->drawText(text, x, y, colour);\r
}\r
\r
-void Boxx::drawText(const char* text, int x, int y, int width, const Colour& colour)\r
+void Boxx::drawText(const char* text, int x, int y, int width, const DrawStyle& colour)\r
{\r
if (parent) parent->drawText(text, area.x + x, area.y + y, width, colour);\r
- else surface->drawText(text, x, y, width, colour.rgba());\r
+ else surface->drawText(text, x, y, width, colour);\r
}\r
\r
-void Boxx::drawTextRJ(const char* text, int x, int y, const Colour& colour)\r
+void Boxx::drawTextRJ(const char* text, int x, int y, const DrawStyle& colour)\r
{\r
if (parent) parent->drawTextRJ(text, area.x + x, area.y + y, colour);\r
- else surface->drawTextRJ(text, x, y, colour.rgba());\r
+ else surface->drawTextRJ(text, x, y, colour);\r
}\r
\r
-void Boxx::drawTextCentre(const char* text, int x, int y, const Colour& colour)\r
+void Boxx::drawTextCentre(const char* text, int x, int y, const DrawStyle& colour)\r
{\r
if (parent) parent->drawTextCentre(text, area.x + x, area.y + y, colour);\r
- else surface->drawTextCentre(text, x, y, colour.rgba());\r
+ else surface->drawTextCentre(text, x, y, colour);\r
}\r
// Now deprecated\r
/*\r
\r
\r
void setGap(UINT gap);\r
- void setBackgroundColour(const Colour& colour);\r
+ void setBackgroundColour(const DrawStyle& colour);\r
void setVisible(bool isVisible);\r
\r
\r
void getRootBoxRegion(Region*);\r
\r
// Drawing functions level 1\r
- void fillColour(const Colour& colour);\r
- void drawPara(const char* text, int x, int y, const Colour& colour);\r
+ void fillColour(const DrawStyle & colour);\r
+ void drawPara(const char* text, int x, int y, const DrawStyle& colour);\r
\r
// Drawing functions level 0\r
- void rectangle(UINT x, UINT y, UINT w, UINT h, const Colour& colour);\r
- void rectangle(Region& region, const Colour& colour);\r
+ void rectangle(UINT x, UINT y, UINT w, UINT h, const DrawStyle& colour);\r
+ void rectangle(Region& region, const DrawStyle& colour);\r
\r
- void drawText(const char* text, int x, int y, const Colour& colour);\r
- void drawText(const char* text, int x, int y, int width, const Colour& colour);\r
- void drawTextRJ(const char* text, int x, int y, const Colour& colour);\r
- void drawTextCentre(const char* text, int x, int y, const Colour& colour);\r
+ void drawText(const char* text, int x, int y, const DrawStyle& colour);\r
+ void drawText(const char* text, int x, int y, int width, const DrawStyle& colour);\r
+ void drawTextRJ(const char* text, int x, int y, const DrawStyle& colour);\r
+ void drawTextCentre(const char* text, int x, int y, const DrawStyle& colour);\r
//Now deprecated\r
//void drawPixel(UINT x, UINT y, const Colour& colour, bool fastdraw=false);\r
void drawBitmap(UINT x, UINT y, const Bitmap& bm);\r
static const int paraMargin = 10;\r
UINT paraVSpace;\r
\r
- Colour backgroundColour;\r
+ DrawStyle backgroundColour;\r
bool backgroundColourSet;\r
bool visible;\r
\r
/*
Real colours
*/
-Colour Colour::BLACK(0, 0, 0);
-Colour Colour::RED(255, 0, 0);
-Colour Colour::GREEN(0, 255, 0);
-Colour Colour::BLUE(0, 0, 255);
-Colour Colour::YELLOW(255, 255, 0);
-Colour Colour::VIDEOBLUE(0, 0, 150);
-Colour Colour::VIEWBACKGROUND(0, 0, 100);
-Colour Colour::TABVIEWBACKGROUND(0, 0, 120);
-Colour Colour::TITLEBARBACKGROUND(0, 0, 200);
-Colour Colour::SELECTHIGHLIGHT(240, 250, 80);
-Colour Colour::SELECTDARKHIGHLIGHT(120, 125, 40);
-Colour Colour::LIGHTTEXT(255, 255, 255);
-Colour Colour::DARKTEXT(0, 0, 100);
-Colour Colour::DANGER(200, 0, 0);
-Colour Colour::BUTTONBACKGROUND(0, 0, 200);
-Colour Colour::PROGRAMMEB(80, 80, 240); // two colours used as alterating backgrounds for individual programmes in EPG
-Colour Colour::PROGRAMMEA(40, 40, 120); // TODO fit epg style (colours) in with rest of application
-Colour Colour::NOPROGRAMME(180, 180, 180); // no programme details colour
+DrawStyle DrawStyle::BLACK(0, 0, 0);
+DrawStyle DrawStyle::RED(255, 0, 0);
+DrawStyle DrawStyle::GREEN(0, 255, 0);
+DrawStyle DrawStyle::BLUE(0, 0, 255);
+DrawStyle DrawStyle::YELLOW(255, 255, 0);
+DrawStyle DrawStyle::VIDEOBLUE(0, 0, 150);
+DrawStyle DrawStyle::VIEWBACKGROUND(0, 0, 100);
+DrawStyle DrawStyle::TABVIEWBACKGROUND(0, 0, 120);
+DrawStyle DrawStyle::TITLEBARBACKGROUND(0, 0, 200);
+DrawStyle DrawStyle::SELECTHIGHLIGHT(240, 250, 80);
+DrawStyle DrawStyle::SELECTDARKHIGHLIGHT(120, 125, 40);
+DrawStyle DrawStyle::LIGHTTEXT(255, 255, 255);
+DrawStyle DrawStyle::DARKTEXT(0, 0, 100);
+DrawStyle DrawStyle::DANGER(200, 0, 0);
+DrawStyle DrawStyle::BUTTONBACKGROUND(0, 0, 200);
+DrawStyle DrawStyle::PROGRAMMEB(80, 80, 240); // two colours used as alterating backgrounds for individual programmes in EPG
+DrawStyle DrawStyle::PROGRAMMEA(40, 40, 120); // TODO fit epg style (colours) in with rest of application
+DrawStyle DrawStyle::NOPROGRAMME(180, 180, 180); // no programme details colour
/*
void set(int Tred, int Tgreen, int Tblue, int Talpha)
{ red = Tred; green = Tgreen; blue = Tblue; alpha = Talpha; }
- unsigned long rgba() const
+ inline unsigned long rgba() const
{
return (alpha << 24) | (red << 16) | (green << 8) | blue;
}
int blue;
int alpha;
- static Colour BLACK;
- static Colour RED;
- static Colour GREEN;
- static Colour YELLOW;
- static Colour BLUE;
- static Colour VIDEOBLUE;
- static Colour VIEWBACKGROUND;
- static Colour TABVIEWBACKGROUND;
- static Colour TITLEBARBACKGROUND;
- static Colour SELECTHIGHLIGHT;
- static Colour SELECTDARKHIGHLIGHT;
- static Colour LIGHTTEXT;
- static Colour DARKTEXT;
- static Colour DANGER;
- static Colour BUTTONBACKGROUND;
- static Colour PROGRAMMEA;
- static Colour PROGRAMMEB;
- static Colour NOPROGRAMME;
+
+};
+
+// TODO move to seperate File
+class DrawStyle: public Colour
+{
+public:
+ DrawStyle()
+ { red = 0; green = 0; blue = 0; alpha = 255; }
+
+ DrawStyle(int Tred, int Tgreen, int Tblue)
+ { red = Tred; green = Tgreen; blue = Tblue; alpha = 255; }
+
+ DrawStyle(int Tred, int Tgreen, int Tblue, int Talpha)
+ { red = Tred; green = Tgreen; blue = Tblue; alpha = Talpha; }
+
+ static DrawStyle BLACK;
+ static DrawStyle RED;
+ static DrawStyle GREEN;
+ static DrawStyle YELLOW;
+ static DrawStyle BLUE;
+ static DrawStyle VIDEOBLUE;
+ static DrawStyle VIEWBACKGROUND;
+ static DrawStyle TABVIEWBACKGROUND;
+ static DrawStyle TITLEBARBACKGROUND;
+ static DrawStyle SELECTHIGHLIGHT;
+ static DrawStyle SELECTDARKHIGHLIGHT;
+ static DrawStyle LIGHTTEXT;
+ static DrawStyle DARKTEXT;
+ static DrawStyle DANGER;
+ static DrawStyle BUTTONBACKGROUND;
+ static DrawStyle PROGRAMMEA;
+ static DrawStyle PROGRAMMEB;
+ static DrawStyle NOPROGRAMME;
+
};
#endif
Boxx* bbg = new Boxx();\r
bbg->setSize(video->getScreenWidth(), video->getScreenHeight());\r
bbg->createBuffer();\r
- bbg->fillColour(Colour::VIDEOBLUE);\r
+ bbg->fillColour(DrawStyle::VIDEOBLUE);\r
boxstack->add(bbg);\r
boxstack->update(bbg);\r
boxstack->remove(bbg);\r
connLost->setOneLiner(tr("Connection lost"));\r
connLost->setDropThrough();\r
connLost->setBorderOn(1);\r
- connLost->setTitleBarColour(Colour::DANGER);\r
+ connLost->setTitleBarColour(DrawStyle::DANGER);\r
connLost->okButton();\r
connLost->draw();\r
boxstack->add(connLost);\r
crash->setPosition(180, 96);\r
crash->setMainText("Oops, vomp crashed.. :(\nPlease report this crash to the author, with as much detail as possible about what you were doing at the time that might have caused the crash.");\r
crash->setBorderOn(1);\r
- crash->setTitleBarColour(Colour::DANGER);\r
+ crash->setTitleBarColour(DrawStyle::DANGER);\r
crash->okButton();\r
crash->setExitable();\r
crash->draw();\r
return screen;\r
}\r
\r
-int Surface::drawText(const char* text, int x, int y, ULONG rgba)\r
+int Surface::drawText(const char* text, int x, int y, const DrawStyle& c)\r
{\r
- return drawText(text, x, y, 2000, rgba);\r
+ return drawText(text, x, y, 2000, c);\r
}\r
\r
-int Surface::drawText(const char* text, int x, int y, int width, ULONG rgba)\r
+int Surface::drawText(const char* text, int x, int y, int width, const DrawStyle& c)\r
{\r
int h, n, i;\r
int Y, X, cx;\r
\r
X = 0;\r
cx = 0;\r
+ ULONG rgba=c.rgba();\r
startFastDraw();\r
for (i=0; i<n; i++)\r
{\r
return 1;\r
}\r
\r
-int Surface::drawTextRJ(const char* text, int x, int y, ULONG rgba)\r
+int Surface::drawTextRJ(const char* text, int x, int y, const DrawStyle& c)\r
{\r
int i, n, w;\r
w = 0;\r
x -= w;\r
\r
if (x < 0) return 0;\r
- else return drawText(text, x, y, rgba);\r
+ else return drawText(text, x, y, c);\r
}\r
\r
-int Surface::drawTextCentre(const char* text, int x, int y, ULONG rgba)\r
+int Surface::drawTextCentre(const char* text, int x, int y, const DrawStyle& c)\r
{\r
int i, n, w;\r
w = 0;\r
x -= w / 2;\r
\r
if (x < 0) return 0;\r
- else return drawText(text, x, y, rgba);\r
+ else return drawText(text, x, y, c);\r
}\r
\r
int Surface::getCharWidth(char c)\r
virtual int getFontHeight();\r
virtual int getCharWidth(char c);\r
\r
- virtual int drawText(const char* text, int x, int y, ULONG rgba);\r
- virtual int drawText(const char* text, int x, int y, int width, ULONG rgba);\r
- virtual int drawTextRJ(const char* text, int x, int y, ULONG rgba);\r
- virtual int drawTextCentre(const char* text, int x, int y, ULONG rgba);\r
+ virtual int drawText(const char* text, int x, int y, const DrawStyle& c);\r
+ virtual int drawText(const char* text, int x, int y, int width, const DrawStyle& c);\r
+ virtual int drawTextRJ(const char* text, int x, int y, const DrawStyle& c);\r
+ virtual int drawTextCentre(const char* text, int x, int y, const DrawStyle& c);\r
\r
virtual void drawJpeg(const char *fileName,int x, int y,int *width, int *height) {}\r
\r
virtual int create(UINT width, UINT height)=0;\r
virtual void display()=0;\r
\r
- virtual int fillblt(int x, int y, int width, int height, unsigned int c)=0;\r
- virtual void drawHorzLine(int x1, int x2, int y, unsigned int c)=0;\r
- virtual void drawVertLine(int x, int y1, int y2, unsigned int c)=0;\r
+ virtual int fillblt(int x, int y, int width, int height, const DrawStyle& c)=0;\r
+ virtual void drawHorzLine(int x1, int x2, int y, const DrawStyle& c)=0;\r
+ virtual void drawVertLine(int x, int y1, int y2, const DrawStyle& c)=0;\r
virtual void drawBitmap(int x, int y, const Bitmap& bm)=0;\r
virtual void drawPoint(int x, int y, Colour& c, bool fastdraw=false); // This draws a point, must not be a pixel\r
virtual void drawMonoBitmap(UCHAR* base, int dx, int dy, unsigned int height,unsigned int width, Colour& nextColour);\r
}
}
-int SurfaceMVP::fillblt(int x, int y, int width, int height, unsigned int c)
+int SurfaceMVP::fillblt(int x, int y, int width, int height, const DrawStyle& c)
{
osd_fillblt_t fblt;
fblt.y = y;
fblt.width = width;
fblt.height = height;
- fblt.colour = c;
+ fblt.colour = c.rgba();
return ioctl(fdOsd, GFX_FB_OSD_FILLBLT, &fblt);
}
*(surface.base[2] + offset) = 0xff;
}
-void SurfaceMVP::drawHorzLine(int x1, int x2, int y, unsigned int c)
+void SurfaceMVP::drawHorzLine(int x1, int x2, int y, const DrawStyle& c)
{
fillblt(x1, y, x2-x1, 1, c);
}
-void SurfaceMVP::drawVertLine(int x, int y1, int y2, unsigned int c)
+void SurfaceMVP::drawVertLine(int x, int y1, int y2, const DrawStyle& c)
{
fillblt(x, y1, 1, y2-y1, c);
}
void display();\r
unsigned long getSurfaceHandle();\r
\r
- int fillblt(int x, int y, int width, int height, unsigned int rgba);\r
+ int fillblt(int x, int y, int width, int height, const DrawStyle& c);\r
\r
- void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
- void drawVertLine(int x, int y1, int y2, unsigned int c);\r
+ void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
+ void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);\r
{\r
}\r
\r
-int SurfaceOpenGL::fillblt(int x, int y, int width, int height, unsigned int c) {\r
+int SurfaceOpenGL::fillblt(int x, int y, int width, int height, const DrawStyle& c) {\r
srf_mutex.Lock();\r
//since this might be called before surface\r
//allocation we will wait in this case, hopefully without deadlocks\r
//osd->EndPainting();\r
srf_mutex.Unlock();\r
\r
- unsigned int my_c=InternalColour(c);\r
+ unsigned int my_c=InternalColour(c.rgba());\r
\r
int iheight=height;\r
if (height+y>sheight) iheight=sheight-y;\r
\r
}\r
\r
-void SurfaceOpenGL::drawHorzLine(int x1, int x2, int y, unsigned int c)\r
+void SurfaceOpenGL::drawHorzLine(int x1, int x2, int y, const DrawStyle& c)\r
{\r
fillblt(x1, y, x2-x1, 1, c);\r
}\r
\r
-void SurfaceOpenGL::drawVertLine(int x, int y1, int y2, unsigned int c)\r
+void SurfaceOpenGL::drawVertLine(int x, int y1, int y2, const DrawStyle& c)\r
{\r
fillblt(x, y1, 1, y2-y1, c);\r
}\r
void startFastDraw();\r
void endFastDraw();\r
\r
- int fillblt(int x, int y, int width, int height, unsigned int c);\r
+ int fillblt(int x, int y, int width, int height, const DrawStyle& c);\r
\r
- void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
- void drawVertLine(int x, int y1, int y2, unsigned int c);\r
+ void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
+ void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);\r
{\r
}\r
\r
-int SurfaceWin::fillblt(int x, int y, int width, int height, unsigned int c)\r
+int SurfaceWin::fillblt(int x, int y, int width, int height, const DrawStyle& c)\r
{\r
WaitForSingleObject(event,INFINITE); //since this might be called before surface\r
//allocation we will wait in this case, hopefully without deadlocks\r
if (!d3dsurface) {\r
return 0; //why does this happen\r
}\r
+ ULONG col=c.rgba();\r
\r
LPDIRECT3DDEVICE9 d3ddev=osd->getD3dDev();\r
\r
for (line=0;line<cheight;line++) {\r
unsigned int*row=((unsigned int*)(((char*)lockrect.pBits)+lockrect.Pitch*line));\r
for (column=0;column<cwidth;column++) {\r
- row[column]=c;\r
+ row[column]=col;\r
}\r
}\r
\r
\r
}\r
\r
-void SurfaceWin::drawHorzLine(int x1, int x2, int y, unsigned int c)\r
+void SurfaceWin::drawHorzLine(int x1, int x2, int y,const DrawStyle& c)\r
{\r
fillblt(x1, y, x2-x1, 1, c);\r
}\r
\r
-void SurfaceWin::drawVertLine(int x, int y1, int y2, unsigned int c)\r
+void SurfaceWin::drawVertLine(int x, int y1, int y2, const DrawStyle& c)\r
{\r
fillblt(x, y1, 1, y2-y1, c);\r
}\r
void startFastDraw();\r
void endFastDraw();\r
\r
- int fillblt(int x, int y, int width, int height, unsigned int c);\r
- void drawHorzLine(int x1, int x2, int y, unsigned int c);\r
- void drawVertLine(int x, int y1, int y2, unsigned int c);\r
+ int fillblt(int x, int y, int width, int height, const DrawStyle& c);\r
+ void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
+ void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
void drawBitmap(int x, int y, const Bitmap& bm);\r
int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);\r
{
//Log::getInstance()->log("TBBoxx", Log::DEBUG, "Draw: %d",this);
- fillColour(Colour::VIEWBACKGROUND);
+ fillColour(DrawStyle::VIEWBACKGROUND);
if (borderOn)
{
rectangle(0, 0, area.w, area.h, titleBarColour);
- rectangle(5, 5, area.w-10, area.h-10, Colour::VIEWBACKGROUND);
+ rectangle(5, 5, area.w-10, area.h-10, DrawStyle::VIEWBACKGROUND);
}
if (titleBarOn)
rectangle(0, 0, area.w, 30, titleBarColour);
if (titleText)
{
- if (titleBarTextWidth) drawText(titleText, 5, 5, titleBarTextWidth, Colour::LIGHTTEXT);
- else drawText(titleText, 5, 5, Colour::LIGHTTEXT);
+ if (titleBarTextWidth) drawText(titleText, 5, 5, titleBarTextWidth, DrawStyle::LIGHTTEXT);
+ else drawText(titleText, 5, 5, DrawStyle::LIGHTTEXT);
}
}
Boxx::draw();
}
-void TBBoxx::setTitleBarColour(const Colour& Tcolour)
+void TBBoxx::setTitleBarColour(const DrawStyle& Tcolour)
{
titleBarColour = Tcolour;
}
void setTitleBarOn(UCHAR on);
void setTitleText(const char* title, int width=0);
- void setTitleBarColour(const Colour& colour);
+ void setTitleBarColour(const DrawStyle& colour);
char* getTitleText() { return titleText; };
private:
int titleBarTextWidth;
protected:
- Colour titleBarColour;
+ DrawStyle titleBarColour;
UCHAR titleBarOn;
};
// FIXME bad drawing
- rectangle(0, 0, area.w, 30, Colour::TITLEBARBACKGROUND);
- drawText(tr("Audio"), 45, 5, Colour::LIGHTTEXT);
+ rectangle(0, 0, area.w, 30, DrawStyle::TITLEBARBACKGROUND);
+ drawText(tr("Audio"), 45, 5, DrawStyle::LIGHTTEXT);
if (subtitles) {
- drawText(tr("Subtitles"), 45+200, 5, Colour::LIGHTTEXT);
+ drawText(tr("Subtitles"), 45+200, 5, DrawStyle::LIGHTTEXT);
ssl.setBackgroundColour(backgroundColour);
ssl.draw();
}
VAudioSelector(void* parent, Channel* channel);
- ~VAudioSelector();
+ virtual ~VAudioSelector();
int handleCommand(int command);
void processMessage(Message* m);
{
setTitleText(tr("Radio Stations"));
}
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
sl.setPosition(10, 30 + 5);
sl.setSize(area.w - 20, area.h - 30 - 15 - 30);
char showing[200];
sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions());
- rectangle(220, 385, 220+160, 385+25, Colour::VIEWBACKGROUND);
- drawText(showing, 220, 385, Colour::LIGHTTEXT);
+ rectangle(220, 385, 220+160, 385+25, DrawStyle::VIEWBACKGROUND);
+ drawText(showing, 220, 385, DrawStyle::LIGHTTEXT);
}
int VChannelList::handleCommand(int command)
setSize((numWidth*10) + 22, 30); // 10 px = width of number chars in font
createBuffer();
setPosition(80, 60);
- setBackgroundColour(Colour::VIEWBACKGROUND);
+ setBackgroundColour(DrawStyle::VIEWBACKGROUND);
}
VChannelSelect::~VChannelSelect()
{
if (input[i] == -1)
{
- drawText("_", 7 + ((numWidth - 1 - i) * 10), 5, Colour::LIGHTTEXT);
+ drawText("_", 7 + ((numWidth - 1 - i) * 10), 5, DrawStyle::LIGHTTEXT);
}
else
{
sprintf(text, "%i", input[i]);
- drawText(text, 7 + ((numWidth - 1 - i) * 10), 5, Colour::LIGHTTEXT);
+ drawText(text, 7 + ((numWidth - 1 - i) * 10), 5, DrawStyle::LIGHTTEXT);
}
}
}
setPosition(xpos, ypos);\r
\r
// beautify\r
-// Colour transparent = Colour(0, 0, 0, 0);\r
+// DrawStyle transparent = DrawStyle(0, 0, 0, 0);\r
// setBackgroundColour(transparent);\r
\r
// progTitle.setSurface(surface);\r
progTitle.setPosition(0,0);\r
progTitle.setSize(300,(getFontHeight() + 4) * 2 + 16); //paragraph line seperation is 4 pixels\r
- progTitle.setBackgroundColour(Colour::TITLEBARBACKGROUND);\r
+ progTitle.setBackgroundColour(DrawStyle::TITLEBARBACKGROUND);\r
progTitle.setTextPos(5, 16);\r
progTitle.setGap(4);\r
add(&progTitle);\r
\r
// progInfo.setSurface(surface);\r
- progInfo.setBackgroundColour(Colour::VIEWBACKGROUND);\r
+ progInfo.setBackgroundColour(DrawStyle::VIEWBACKGROUND);\r
progInfo.setPosition(0, progTitle.getY2());\r
progInfo.setSize(300,((getFontHeight() + 4) * summaryLines) + summaryLowerPadding);\r
progInfo.setGap(4);\r
// chanName.setSurface(surface);\r
chanName.setSize(510, (getFontHeight() + 4));\r
chanName.setPosition(305, chanNameYpos);\r
- Colour t1(0, 0, 0, 90);\r
+ DrawStyle t1(0, 0, 0, 90);\r
chanName.setBackgroundColour(t1);\r
add(&chanName);\r
\r
{\r
// View::draw(); // draw pallet\r
// beautify\r
- Colour transparent = Colour(0, 0, 0, 0);\r
+ DrawStyle transparent = DrawStyle(0, 0, 0, 0);\r
fillColour(transparent);\r
\r
\r
\r
UINT keyx = chanListbox.getRootBoxOffsetX();\r
UINT keyy = chanListbox.getRootBoxOffsetY() + chanListbox.getHeight() + 2;\r
- Colour ref1 = Colour(100, 100, 100, 255);\r
+ DrawStyle ref1 = DrawStyle(100, 100, 100, 255); //to do global definition for skin\r
rectangle(keyx, keyy, 605, getFontHeight() * 2 + 14, ref1);\r
\r
WSymbol w;\r
w.setPosition(keyx + 50, keyy + 20);\r
w.draw();\r
\r
- drawText(tr("OK"), keyx + 18, keyy + 20, Colour::LIGHTTEXT);\r
+ drawText(tr("OK"), keyx + 18, keyy + 20, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref2 = Colour(200, 0, 0, 255);\r
+ DrawStyle ref2 = DrawStyle(200, 0, 0, 255);\r
rectangle(keyx + 72, keyy + 4, 104, getFontHeight() + 2, ref2);\r
- drawText(tr("Page up"), keyx + 74, keyy + 5, Colour::LIGHTTEXT);\r
+ drawText(tr("Page up"), keyx + 74, keyy + 5, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref3 = Colour(0, 200, 0, 255);\r
+ DrawStyle ref3 = DrawStyle(0, 200, 0, 255);\r
rectangle(keyx + 72, keyy + getFontHeight() + 8, 104, getFontHeight() + 2, ref3);\r
- drawText(tr("Page down"), keyx + 74, keyy + getFontHeight() + 9, Colour::LIGHTTEXT);\r
+ drawText(tr("Page down"), keyx + 74, keyy + getFontHeight() + 9, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref4 = Colour(200, 200, 0, 255);\r
+ DrawStyle ref4 = DrawStyle(200, 200, 0, 255);\r
rectangle(keyx + 180, keyy + 4, 104, getFontHeight() + 2, ref4);\r
- drawText(tr("-24 hours"), keyx + 182, keyy + 5, Colour::LIGHTTEXT);\r
+ drawText(tr("-24 hours"), keyx + 182, keyy + 5, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref5 = Colour(0, 0, 200, 255);\r
+ DrawStyle ref5 = DrawStyle(0, 0, 200, 255);\r
rectangle(keyx + 180, keyy + getFontHeight() + 8, 104, getFontHeight() + 2, ref5);\r
- drawText(tr("+24 hours"), keyx + 182, keyy + getFontHeight() + 9, Colour::LIGHTTEXT);\r
+ drawText(tr("+24 hours"), keyx + 182, keyy + getFontHeight() + 9, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref6 = Colour(180, 180, 180, 255);\r
+ DrawStyle ref6 = DrawStyle(180, 180, 180, 255);\r
rectangle(keyx + 290, keyy + 4, 180, getFontHeight() + 2, ref6);\r
- drawText(tr("Guide / Back: Close"), keyx + 292 , keyy + 5, Colour::LIGHTTEXT);\r
+ drawText(tr("Guide / Back: Close"), keyx + 292 , keyy + 5, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref7 = Colour(180, 180, 180, 255);\r
+ DrawStyle ref7 = DrawStyle(180, 180, 180, 255);\r
rectangle(keyx + 290, keyy + getFontHeight() + 8, 180, getFontHeight() + 2, ref7);\r
- Colour red = Colour(130, 0, 0);\r
+ DrawStyle red = DrawStyle(130, 0, 0);\r
drawText(tr("Rec: Set timer"), keyx + 292, keyy + getFontHeight() + 9, red);\r
\r
- Colour ref8 = Colour(180, 180, 180, 255);\r
+ DrawStyle ref8 = DrawStyle(180, 180, 180, 255);\r
rectangle(keyx + 474, keyy + 4, 128, getFontHeight() + 2, ref8);\r
w.nextSymbol = WSymbol::PLAY;\r
w.setPosition(keyx + 476, keyy + 5);\r
w.draw();\r
- drawText(tr("Sel channel"), keyx + 496, keyy + 5, Colour::LIGHTTEXT);\r
+ drawText(tr("Sel channel"), keyx + 496, keyy + 5, DrawStyle::LIGHTTEXT);\r
\r
- Colour ref9 = Colour(180, 180, 180, 255);\r
+ DrawStyle ref9 = DrawStyle(180, 180, 180, 255);\r
rectangle(keyx + 474, keyy + getFontHeight() + 8, 128, getFontHeight() + 2, ref9);\r
- drawText(tr("Go: Preview"), keyx + 476, keyy + getFontHeight() + 9, Colour::LIGHTTEXT);\r
+ drawText(tr("Go: Preview"), keyx + 476, keyy + getFontHeight() + 9, DrawStyle::LIGHTTEXT);\r
\r
\r
// Draw all the dynamic data\r
chanListbox.getRootBoxOffsetY() - getFontHeight() - 3,\r
155 + WINDOW_WIDTH * MINUTE_SCALE,\r
chanListbox.getHeight() + getFontHeight() + 4,\r
- Colour::BLACK);\r
+ DrawStyle::BLACK);\r
\r
chanListbox.draw();\r
drawgrid();\r
updateEventList();\r
}\r
// draw time scale\r
- Colour white = Colour(255, 255, 255, 255);\r
+ DrawStyle white = DrawStyle(255, 255, 255, 255);\r
\r
t = ltime;\r
struct tm* tms;\r
strftime(timeString, 19, "%a %d %b", tms);\r
int timey = chanListbox.getRootBoxOffsetY() - getFontHeight() - 3;\r
int timex = 135;\r
- drawTextRJ(timeString, timex - 10, timey, Colour::LIGHTTEXT); // print date\r
+ drawTextRJ(timeString, timex - 10, timey, DrawStyle::LIGHTTEXT); // print date\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, timex, timey, Colour::LIGHTTEXT); // print left time\r
+ drawText(timeString, timex, timey, DrawStyle::LIGHTTEXT); // print left time\r
\r
rectangle(155, timey + getFontHeight(), 2, 7, white);\r
t = t + 3600;\r
tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, timex + 180, timey, Colour::LIGHTTEXT); // print middle time\r
+ drawText(timeString, timex + 180, timey, DrawStyle::LIGHTTEXT); // print middle time\r
rectangle(335, timey + getFontHeight(), 2, 7, white);\r
t = t + 3600;\r
tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, timex + 360, timey, Colour::LIGHTTEXT); // print right time\r
+ drawText(timeString, timex + 360, timey, DrawStyle::LIGHTTEXT); // print right time\r
rectangle(515, timey + getFontHeight(), 2, 7, white);\r
// pointer to selTime\r
- //rectangle(155 + (selTime - ltime) / 20, timey + getFontHeight(), 2, 7, Colour(255, 50, 50, 255));\r
+ //rectangle(155 + (selTime - ltime) / 20, timey + getFontHeight(), 2, 7, DrawStyle(255, 50, 50, 255));\r
\r
// current time line\r
time(&t);\r
if ((t >= ltime) && (t < (ltime + 9000)))\r
{\r
- rectangle(155 + (t - ltime) / 20, timey + getFontHeight(), 2, ((getFontHeight() + 2) * 7) + 7 + 2, Colour::RED);\r
+ rectangle(155 + (t - ltime) / 20, timey + getFontHeight(), 2, ((getFontHeight() + 2) * 7) + 7 + 2, DrawStyle::RED);\r
}\r
\r
// TODO should the above two comditional statements be combined to avoid calling updateEventList() twice?\r
bool swapColour = false; // alternate cell colour\r
bool currentRow = false;\r
int y = chanListbox.getRootBoxOffsetY() + 5; // vertical position of cell\r
- Colour bg, fg; // background colour of cells in grid\r
+ DrawStyle bg, fg; // background colour of cells in grid\r
// for each displayed channel, find programmes that fall in 2.5 hour time window\r
for(UINT listIndex = 0; listIndex < gridRows; listIndex++)\r
{\r
noevent.time = ltime;\r
noevent.duration = WINDOW_WIDTH * 60;\r
noevent.settitle("");\r
- paintCell(&noevent, y, Colour::NOPROGRAMME, Colour::LIGHTTEXT); // fill row with no programme colour to be painted ove with valid programmes\r
+ paintCell(&noevent, y, DrawStyle::NOPROGRAMME, DrawStyle::LIGHTTEXT); // fill row with no programme colour to be painted ove with valid programmes\r
if (currentRow)\r
{\r
thisEvent.setdescription(tr("There are no programme details available for this period"));\r
sort(eventLista[listIndex]->begin(), eventLista[listIndex]->end(), EventSorter());\r
for(e = 0; e < (eventLista[listIndex])->size(); e++) // step through events for this channel\r
{\r
- fg = Colour::LIGHTTEXT;\r
+ fg = DrawStyle::LIGHTTEXT;\r
event = (*eventLista[listIndex])[e];\r
if (event)\r
{\r
if(end <= UINT(ltime)) // programme ends before LHS of window\r
continue; // this event is before the window - let's try the next event\r
// this event is one we are interested in\r
- bg = (swapColour)?Colour::PROGRAMMEA:Colour::PROGRAMMEB; // alternate cell colour\r
+ bg = (swapColour)?DrawStyle::PROGRAMMEA:DrawStyle::PROGRAMMEB; // alternate cell colour\r
swapColour = !swapColour; // it wil be the other colour next time\r
if(event->time <= UINT(selTime) && end > UINT(selTime) && currentRow)\r
{\r
thisEvent.id = event->id;\r
if(thisEvent.id == 0)\r
thisEvent.id = 1;\r
- bg = Colour::SELECTHIGHLIGHT; // highlight cell\r
- fg = Colour::DARKTEXT;\r
+ bg = DrawStyle::SELECTHIGHLIGHT; // highlight cell\r
+ fg = DrawStyle::DARKTEXT;\r
}\r
else\r
{\r
// no event list for this channel. Already painted noevent colour so just highlight if selected\r
if (currentRow)\r
{\r
- bg = Colour::SELECTHIGHLIGHT; // highlight cell\r
- fg = Colour::DARKTEXT;\r
+ bg = DrawStyle::SELECTHIGHLIGHT; // highlight cell\r
+ fg = DrawStyle::DARKTEXT;\r
paintCell(&thisEvent, y, bg, fg);\r
}\r
else\r
{\r
- bg = Colour::NOPROGRAMME;\r
- fg = Colour::LIGHTTEXT;\r
+ bg = DrawStyle::NOPROGRAMME;\r
+ fg = DrawStyle::LIGHTTEXT;\r
noevent.settitle(tr("No programme details"));\r
paintCell(&noevent, y, bg, fg);\r
}\r
boxstack->update(this, &r);\r
}\r
\r
-void VEpg::paintCell(Event* event, int yOffset, const Colour& bg, const Colour& fg)\r
+void VEpg::paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawStyle& fg)\r
{\r
int w, x, y, h;\r
w = x = 0; // keep compiler happy\r
{\r
strncpy(tT, tt, textWidth - 1);\r
tT[textWidth - 1] = '\0';\r
- surface->drawText(tT, x+2, y, fg.rgba());\r
+ surface->drawText(tT, x+2, y, fg);\r
}\r
delete tT;\r
\r
int listWindowSize;
void updateChanList();
void updateEventList();
- void paintCell(Event* event, int yOffset, const Colour& bg, const Colour& fg);
+ void paintCell(Event* event, int yOffset, const DrawStyle& bg, const DrawStyle& fg);
time_t prevHour(time_t* t);
void* parent;
BoxStack* boxstack;
}
setTitleBarOn(1);
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
setBorderOn(true);
setTitleText(tr("Set Timer"));
void VEpgSetTimer::draw()
{
TBBoxx::draw();
- drawPara(event->title, 10, 40, Colour::LIGHTTEXT);
- drawText(channel->name, 10, 40 + (2 * getFontHeight()), Colour::LIGHTTEXT);
+ drawPara(event->title, 10, 40, DrawStyle::LIGHTTEXT);
+ drawText(channel->name, 10, 40 + (2 * getFontHeight()), DrawStyle::LIGHTTEXT);
char fullString[20];
time_t t;
strcat(fullString, timeString); // put it in our buffer
- drawText(fullString, 10, 40 + (3 * getFontHeight()), Colour::LIGHTTEXT);
- drawText(tr("Create this timer?"), 10, 40 + (5 * getFontHeight()), Colour::LIGHTTEXT);
+ drawText(fullString, 10, 40 + (3 * getFontHeight()), DrawStyle::LIGHTTEXT);
+ drawText(tr("Create this timer?"), 10, 40 + (5 * getFontHeight()), DrawStyle::LIGHTTEXT);
buttonYes.draw();
buttonNo.draw();
dropThrough = 0;
setTitleBarOn(1);
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
}
VInfo::~VInfo()
{
if (mainTextType == NORMAL)
{
- drawPara(mainText, 10, 45, Colour::LIGHTTEXT);
+ drawPara(mainText, 10, 45, DrawStyle::LIGHTTEXT);
}
if (mainTextType == ONELINER)
{
- if (titleBarOn) drawTextCentre(mainText, area.w / 2, 75, Colour::LIGHTTEXT);
- else drawTextCentre(mainText, area.w / 2, 55, Colour::LIGHTTEXT);
+ if (titleBarOn) drawTextCentre(mainText, area.w / 2, 75, DrawStyle::LIGHTTEXT);
+ else drawTextCentre(mainText, area.w / 2, 55, DrawStyle::LIGHTTEXT);
}
}
}
void VMute::draw()
{
// draw background?
- fillColour(Colour::VIEWBACKGROUND);
+ fillColour(DrawStyle::VIEWBACKGROUND);
WSymbol w;
TEMPADD(&w);
VOpts::VOpts()\r
{\r
setTitleBarOn(1);\r
- setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
setTitleText(tr("Options"));\r
\r
\r
// View::draw();
if (shortInfo) {
if (info) {
- drawText(info,5,area.h-25,Colour::LIGHTTEXT);
+ drawText(info,5,area.h-25,DrawStyle::LIGHTTEXT);
}
- else drawText(tr("Loading"),5,3,Colour::LIGHTTEXT);
+ else drawText(tr("Loading"),5,3,DrawStyle::LIGHTTEXT);
}
else {
int x=5;
- rectangle(x, area.h - 24, 18, 16, Colour::RED);
+ rectangle(x, area.h - 24, 18, 16, DrawStyle::RED);
x+=18+3;
- drawText(tr("rotate"), x, area.h - 25, Colour::LIGHTTEXT);
+ drawText(tr("rotate"), x, area.h - 25, DrawStyle::LIGHTTEXT);
x+=rotsize+3;
- rectangle(x, area.h - 24, 18, 16, Colour::GREEN);
+ rectangle(x, area.h - 24, 18, 16, DrawStyle::GREEN);
x+=18+3;
- drawText(tr("info"), 5+18+3+rotsize+3+18+3, area.h - 25, Colour::LIGHTTEXT);
+ drawText(tr("info"), 5+18+3+rotsize+3+18+3, area.h - 25, DrawStyle::LIGHTTEXT);
x+=infsize+3;
WSymbol w;
TEMPADD(&w);
w.draw();
x+=20+3;
if (info) {
- drawText(info,x,area.h - 25,Colour::LIGHTTEXT);
+ drawText(info,x,area.h - 25,DrawStyle::LIGHTTEXT);
}
}
}
{
TBBoxx::draw();
- if (mainText) drawPara(mainText, 10, 45, Colour::LIGHTTEXT);
+ if (mainText) drawPara(mainText, 10, 45, DrawStyle::LIGHTTEXT);
}
void VQuestion::swap()
\r
void VRadioRec::draw()\r
{\r
- fillColour(Colour::BLACK);\r
+ fillColour(DrawStyle::BLACK);\r
}\r
\r
void VRadioRec::go()\r
doBar(3);\r
return;\r
// int progressWidth = 302 * currentFrameNum / lengthFrames;\r
- // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
}\r
}\r
else\r
time(&t);\r
struct tm* tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, barRegion.x + 624, barRegion.y + 12, Colour::LIGHTTEXT);\r
+ drawText(timeString, barRegion.x + 624, barRegion.y + 12, DrawStyle::LIGHTTEXT);\r
\r
// Draw clocks\r
\r
strcpy(buffer, "-:--:-- / -:--:--");\r
}\r
\r
- drawText(buffer, clocksRegion.x, clocksRegion.y, Colour::LIGHTTEXT);\r
+ drawText(buffer, clocksRegion.x, clocksRegion.y, DrawStyle::LIGHTTEXT);\r
\r
// Draw progress bar\r
int progBarXbase = barRegion.x + 300;\r
\r
- rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, DrawStyle::LIGHTTEXT);\r
rectangle(barRegion.x + progBarXbase + 2, barRegion.y + 14, 306, 20, barBlue);\r
\r
if (currentSeconds > lengthSeconds) return;\r
\r
// Draw yellow portion\r
int progressWidth = 302 * currentSeconds / lengthSeconds;\r
- rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
/*\r
\r
if (myRec->recInfo->timerEnd > time(NULL)) // if chasing\r
Log::getInstance()->log("GVASDF", Log::DEBUG, "Length Frames: %lu", lengthFrames);\r
// Log::getInstance()->log("GVASDF", Log::DEBUG, "Player lf: %lu", player->getLengthFrames());\r
Log::getInstance()->log("GVASDF", Log::DEBUG, "NR WDITH: %i", nrWidth);\r
- rectangle(barRegion.x + progBarXbase + 4 + 302 - nrWidth, barRegion.y + 16, nrWidth, 16, Colour::RED);\r
+ rectangle(barRegion.x + progBarXbase + 4 + 302 - nrWidth, barRegion.y + 16, nrWidth, 16, DrawStyle::RED);\r
}\r
*/\r
\r
posPix = 302 * startMargin / lengthSeconds;\r
logger->log("VRadioRec", Log::DEBUG, "posPix %i", posPix);\r
\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);\r
\r
posPix = 302 * (lengthSeconds - endMargin) / lengthSeconds;\r
\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);\r
}\r
\r
void VRadioRec::removeBar()\r
if (!barShowing) return;\r
timers->cancelTimer(this, 2);\r
barShowing = false;\r
- rectangle(barRegion, Colour::BLACK);\r
+ rectangle(barRegion, DrawStyle::BLACK);\r
boxstack->update(this, &barRegion);\r
}\r
\r
Recording* myRec;
BoxStack* boxstack;
- Colour barBlue;
+ DrawStyle barBlue;
bool playing;
bool barShowing;
setTitleBarOn(1);
setBorderOn(1);
setTitleText(tr("Move recording"));
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
sl.setPosition(10, 30 + 5);
sl.setSize(area.w - 40, area.h - 30 - 15);
{
TBBoxx::draw();
- rectangle(area.w - 30, 30 + 5, 20, area.h - 30 - 15, Colour::VIEWBACKGROUND);
+ rectangle(area.w - 30, 30 + 5, 20, area.h - 30 - 15, DrawStyle::VIEWBACKGROUND);
WSymbol w;
TEMPADD(&w);
setTitleBarOn(1);\r
setBorderOn(1);\r
setTitleText(rec->getProgName());\r
- setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
\r
summary.setPosition(10, 30 + 5);\r
summary.setSize(area.w - 20, area.h - 30 - 15 - 50);\r
VQuestion* v = new VQuestion(this);\r
v->setSize(260, 180);\r
v->createBuffer();\r
- v->setTitleBarColour(Colour::DANGER);\r
+ v->setTitleBarColour(DrawStyle::DANGER);\r
v->setTitleBarOn(1);\r
v->setBorderOn(1);\r
v->setTitleText(tr("Delete recording"));\r
}\r
\r
setTitleBarOn(1);\r
- setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
\r
sl.setPosition(10, 30 + 5);\r
sl.setSize(area.w - 20, area.h - 30 - 15 - 30);\r
\r
if (loading)\r
{\r
- drawText(tr("Loading..."), 240, 180, Colour::LIGHTTEXT);\r
+ drawText(tr("Loading..."), 240, 180, DrawStyle::LIGHTTEXT);\r
}\r
else\r
{\r
char freeSpace[50];\r
int gigFree = recman->getFreeSpace() / 1024;\r
SNPRINTF(freeSpace, 49, tr("%lu%% used, %iGB free"), recman->getUsedPercent(), gigFree);\r
- drawTextRJ(freeSpace, 560, 5, Colour::LIGHTTEXT);\r
+ drawTextRJ(freeSpace, 560, 5, DrawStyle::LIGHTTEXT);\r
// Symbols\r
\r
WSymbol w;\r
w.nextSymbol = WSymbol::PLAY;\r
w.setPosition(150, 385);\r
w.draw();\r
- drawTextRJ(tr("[ok] = menu"), 560, 385, Colour::LIGHTTEXT);\r
+ drawTextRJ(tr("[ok] = menu"), 560, 385, DrawStyle::LIGHTTEXT);\r
\r
// All static stuff done\r
drawData(doIndexPop);\r
int topOption = sl.getTopOption() + 1;\r
if (sl.getNumOptions() == 0) topOption = 0;\r
\r
- rectangle(220, 385, 180, 25, Colour::VIEWBACKGROUND);\r
+ rectangle(220, 385, 180, 25, DrawStyle::VIEWBACKGROUND);\r
char showing[200];\r
sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions());\r
- drawText(showing, 220, 385, Colour::LIGHTTEXT);\r
+ drawText(showing, 220, 385, DrawStyle::LIGHTTEXT);\r
}\r
\r
void VRecordingList::processMessage(Message* m)\r
vi->setOneLiner(tr("Failed to delete recording"));\r
vi->setExitable();\r
vi->setBorderOn(1);\r
- vi->setTitleBarColour(Colour::DANGER);\r
+ vi->setTitleBarColour(DrawStyle::DANGER);\r
vi->okButton();\r
vi->draw();\r
boxstack->add(vi);\r
vi->setOneLiner(tr("Failed to move recording"));\r
vi->setExitable();\r
vi->setBorderOn(1);\r
- vi->setTitleBarColour(Colour::DANGER);\r
+ vi->setTitleBarColour(DrawStyle::DANGER);\r
vi->okButton();\r
vi->draw();\r
boxstack->add(vi);\r
vi->setOneLiner(tr("H264 video not supported"));\r
vi->setExitable();\r
vi->setBorderOn(1);\r
- vi->setTitleBarColour(Colour::DANGER);\r
+ vi->setTitleBarColour(DrawStyle::DANGER);\r
vi->okButton();\r
vi->draw();\r
boxstack->add(vi);\r
setTitleBarOn(1);
setBorderOn(1);
setTitleText(tr("Programme menu"));
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
sl.setPosition(10, 30 + 5);
sl.setSize(area.w - 20, area.h - 30 - 15);
VQuestion* v = new VQuestion(this);
v->setSize(260, 180);
v->createBuffer();
- v->setTitleBarColour(Colour::DANGER);
+ v->setTitleBarColour(DrawStyle::DANGER);
v->setTitleBarOn(1);
v->setBorderOn(1);
v->setTitleText(tr("Delete recording"));
void VScreensaver::draw()
{
- fillColour(Colour::BLACK);
+ fillColour(DrawStyle::BLACK);
threadStart();
}
fx = x[0] = 50;
fy = y[0] = 50;
+ Colour black=(Colour)DrawStyle::BLACK;
+ Colour light=(Colour)DrawStyle::SELECTHIGHLIGHT;
+
while(1)
{
if (++head == h) head = 0;
if (tail == h) tail = 0;
// Undraw oldest point
- if (x[tail] != -1) surface->drawPoint(x[tail], y[tail], Colour::BLACK);// was rgba
+ if (x[tail] != -1) surface->drawPoint(x[tail], y[tail], black);// was rgba
dd = ((rand() / (double)RAND_MAX) * deviation) - halfdeviation;
direction += dd;
x[head] = (int)fx;
y[head] = (int)fy;
- surface->drawPoint(x[head], y[head], Colour::SELECTHIGHLIGHT); // was rgba
+ surface->drawPoint(x[head], y[head], light); // was rgba
MILLISLEEP(10);
}
}
}
setTitleBarOn(1);
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
setTitleText(tr("Choose a VDR server"));
sl.setPosition(10, 30 + 5);
void VSleeptimer::draw()
{
- fillColour(Colour::VIEWBACKGROUND);
+ fillColour(DrawStyle::VIEWBACKGROUND);
WSymbol w;
TEMPADD(&w);
w.nextSymbol = WSymbol::CLOCK;
w.draw();
Boxx::draw();
- drawText(displaySleeptimer,50,2,Colour::LIGHTTEXT);
+ drawText(displaySleeptimer,50,2,DrawStyle::LIGHTTEXT);
Timers::getInstance()->setTimerD(this, 1, 2);
}
void VCountdown::draw(const char* sec)
{
- fillColour(Colour::VIEWBACKGROUND);
+ fillColour(DrawStyle::VIEWBACKGROUND);
WSymbol w;
TEMPADD(&w);
w.nextSymbol = WSymbol::CLOCK;
- w.nextColour = Colour::RED;
+ w.nextColour = DrawStyle::RED;
w.setPosition(3, 0);
w.draw();
Boxx::draw();
- drawText(sec,50,2,Colour::RED);
+ drawText(sec,50,2,DrawStyle::RED);
Timers::getInstance()->setTimerD(this, 1, 1);
}
setTitleBarOn(1);
setTitleText(tr("Edit Timer"));
- setTitleBarColour(Colour::TITLEBARBACKGROUND);
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
}
VTimerEdit::~VTimerEdit()
int xpos = 20;
int ypos = 50;
int fontheight=getFontHeight();
- drawText(tr("Active"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Channel"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Name"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Directory"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Active"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Channel"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Name"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Directory"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
ypos += fontheight;
- drawText(tr("Start"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Stop"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Priority"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Lifetime"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Start"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Stop"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Priority"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Lifetime"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
ypos += fontheight;
- drawText(tr("Current"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
- drawText(tr("Recording"), xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Current"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
+ drawText(tr("Recording"), xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Temp
// Active
if (recTimer->active) strcpy(buffer, "Yes");
else strcpy(buffer, "No");
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Channel
SNPRINTF(buffer, 999, "%lu", recTimer->channelNumber);
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Name
SNPRINTF(buffer, 999, "%s", recTimer->getName());
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Directory
if (recTimer->getDirectory()) SNPRINTF(buffer, 999, "%s", recTimer->getDirectory());
else strcpy(buffer, "");
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
ypos += fontheight;
// Start
tms = localtime((time_t*)&recTimer->startTime);
strftime(buffer, 999, "%d/%m %H:%M", tms);
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Stop
tms = localtime((time_t*)&recTimer->stopTime);
strftime(buffer, 999, "%d/%m %H:%M", tms);
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Priority
SNPRINTF(buffer, 999, "%lu", recTimer->priority);
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Lifetime
SNPRINTF(buffer, 999, "%lu", recTimer->lifeTime);
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
ypos += fontheight;
// Current
if (recTimer->pending) strcpy(buffer, "Yes");
else strcpy(buffer, "No");
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
// Recording now
if (recTimer->recording) strcpy(buffer, "Yes");
else strcpy(buffer, "No");
- drawText(buffer, xpos, ypos, Colour::LIGHTTEXT); ypos += fontheight;
+ drawText(buffer, xpos, ypos, DrawStyle::LIGHTTEXT); ypos += fontheight;
}
void VTimerEdit::swap()
VQuestion* v = new VQuestion(this);
v->setSize(260, 180);
v->createBuffer();
- v->setTitleBarColour(Colour::DANGER);
+ v->setTitleBarColour(DrawStyle::DANGER);
v->setTitleBarOn(1);
v->setBorderOn(1);
v->setTitleText("Delete timer");
\r
setTitleBarOn(1);\r
setTitleText(tr("Timers"));\r
- setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
\r
sl.setPosition(30, 30 + 5);\r
sl.setSize(area.w - 40, area.h - 30 - 15 - 30);\r
w.setPosition(115, 385);\r
w.draw();\r
\r
- drawTextRJ("[ok] = edit", 560, 385, Colour::LIGHTTEXT);\r
+ drawTextRJ("[ok] = edit", 560, 385, DrawStyle::LIGHTTEXT);\r
\r
drawClock();\r
drawShowing();\r
time(&t);\r
struct tm* tms = localtime(&t);\r
strftime(timeString, 19, "%d/%m %H:%M:%S", tms);\r
- drawTextRJ(timeString, 560, 5, Colour::LIGHTTEXT);\r
+ drawTextRJ(timeString, 560, 5, DrawStyle::LIGHTTEXT);\r
\r
Timers::getInstance()->setTimerT(this, 1, t + 1);\r
}\r
int topOption = sl.getTopOption() + 1;\r
if (sl.getNumOptions() == 0) topOption = 0;\r
\r
- rectangle(220, 385, 180, 25, Colour::VIEWBACKGROUND);\r
+ rectangle(220, 385, 180, 25, DrawStyle::VIEWBACKGROUND);\r
char showing[200];\r
sprintf(showing, tr("%i to %i of %i"), topOption, sl.getBottomOption(), sl.getNumOptions());\r
- drawText(showing, 220, 385, Colour::LIGHTTEXT);\r
+ drawText(showing, 220, 385, DrawStyle::LIGHTTEXT);\r
}\r
\r
void VTimerList::drawIndicators()\r
int yinc = getFontHeight() + 1;\r
RecTimer* recTimer;\r
\r
- rectangle(6, 44, 18, 15*yinc, Colour::VIEWBACKGROUND);\r
+ rectangle(6, 44, 18, 15*yinc, DrawStyle::VIEWBACKGROUND);\r
\r
// The indexes recorded from the wselectlist into the index member of the RecTimer\r
// Is the same as the position in the vector of RecTimers\r
{\r
if (flipflop)\r
{\r
- rectangle(6, ypos, 18, 16, Colour::RED);\r
- drawText("R", 8, ypos-3, Colour::LIGHTTEXT);\r
+ rectangle(6, ypos, 18, 16, DrawStyle::RED);\r
+ drawText("R", 8, ypos-3, DrawStyle::LIGHTTEXT);\r
}\r
}\r
else if (recTimer->pending)\r
{\r
- rectangle(6, ypos, 18, 16, Colour::RED);\r
- drawText("X", 8, ypos-3, Colour::BLACK);\r
+ rectangle(6, ypos, 18, 16, DrawStyle::RED);\r
+ drawText("X", 8, ypos-3, DrawStyle::BLACK);\r
}\r
else if (recTimer->active == 0)\r
{\r
- rectangle(6, ypos, 18, 16, Colour::SELECTHIGHLIGHT);\r
- drawText("X", 8, ypos-3, Colour::BLACK);\r
+ rectangle(6, ypos, 18, 16, DrawStyle::SELECTHIGHLIGHT);\r
+ drawText("X", 8, ypos-3, DrawStyle::BLACK);\r
}\r
else\r
{\r
-// if (flipflop) rectangle(6, ypos, 18, 16, Colour::GREEN);\r
+// if (flipflop) rectangle(6, ypos, 18, 16, DrawStyle::GREEN);\r
}\r
\r
ypos += yinc;\r
\r
errorBox->setExitable();\r
errorBox->setBorderOn(1);\r
- errorBox->setTitleBarColour(Colour::DANGER);\r
+ errorBox->setTitleBarColour(DrawStyle::DANGER);\r
errorBox->okButton();\r
errorBox->draw();\r
BoxStack::getInstance()->add(errorBox);\r
#include "vteletextview.h"\r
\r
VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, VChannelList* tvchannelList)\r
+: osdBack(0, 0, 0, 128)\r
{\r
vdr = VDR::getInstance();\r
boxstack = BoxStack::getInstance();\r
\r
setSize(video->getScreenWidth(), video->getScreenHeight());\r
createBuffer();\r
- Colour transparent(0, 0, 0, 0);\r
+ DrawStyle transparent(0, 0, 0, 0);\r
setBackgroundColour(transparent);\r
#ifdef PAL_WSS\r
dowss = false;\r
// This is only used on old remotes to stop up/down buttons being used for osd-epg scrolling\r
okTriggeredOSD = false;\r
\r
- Colour osdBack = Colour(0, 0, 0, 128);\r
\r
+\r
osd.setBackgroundColour(osdBack);\r
osd.setPosition(0, video->getScreenHeight() - 150);\r
osd.setSize(video->getScreenWidth(), 150);\r
osdChanName.setSize(300, 30);\r
osd.add(&osdChanName);\r
\r
- boxRed.setBackgroundColour(Colour::RED);\r
+ boxRed.setBackgroundColour(DrawStyle::RED);\r
boxRed.setPosition(54, 104);\r
boxRed.setSize(18, 16);\r
osd.add(&boxRed);\r
\r
- boxGreen.setBackgroundColour(Colour::GREEN);\r
+ boxGreen.setBackgroundColour(DrawStyle::GREEN);\r
boxGreen.setPosition(220, 104);\r
boxGreen.setSize(18, 16);\r
osd.add(&boxGreen);\r
\r
- boxYellow.setBackgroundColour(Colour::YELLOW);\r
+ boxYellow.setBackgroundColour(DrawStyle::YELLOW);\r
boxYellow.setPosition(390, 104);\r
boxYellow.setSize(18, 16);\r
osd.add(&boxYellow);\r
\r
- boxBlue.setBackgroundColour(Colour::BLUE);\r
+ boxBlue.setBackgroundColour(DrawStyle::BLUE);\r
boxBlue.setPosition(560, 104);\r
boxBlue.setSize(18, 16);\r
osd.add(&boxBlue); \r
textSummary.setParaMode(true);\r
summary.add(&textSummary);\r
\r
- summaryBlackLine.setBackgroundColour(Colour::BLACK);\r
+ summaryBlackLine.setBackgroundColour(DrawStyle::BLACK);\r
summaryBlackLine.setPosition(0, summary.getHeight() - 4);\r
summaryBlackLine.setSize(summary.getWidth(), 4);\r
summary.add(&summaryBlackLine);\r
\r
sAspectRatio.setPosition(osd.getWidth() - 90, 40);\r
- sAspectRatio.nextColour = Colour::SELECTHIGHLIGHT;\r
+ sAspectRatio.nextColour = DrawStyle::SELECTHIGHLIGHT;\r
sAspectRatio.setVisible(false);\r
osd.add(&sAspectRatio);\r
\r
osd.add(&bufferBar);\r
\r
sAudioChannels.setPosition(osd.getWidth() - 130, 40);\r
- sAudioChannels.nextColour = Colour::SELECTHIGHLIGHT;\r
+ sAudioChannels.nextColour = DrawStyle::SELECTHIGHLIGHT;\r
sAudioChannels.setVisible(false);\r
osd.add(&sAudioChannels);\r
\r
// Draw the selector\r
vas = new VAudioSelector(this, (*chanList)[currentChannelIndex], ((PlayerLiveTV*)player)->getCurrentAudioChannel(),\r
subtitleType,subtitleChannel,NULL);\r
- Colour osdBack = Colour(0, 0, 0, 128);\r
+\r
vas->setBackgroundColour(osdBack);\r
vas->setPosition(0, osd.getScreenY() - vas->getHeight());\r
vas->draw();\r
\r
void VVideoLiveTV::clearOSD()\r
{\r
- rectangle(area, Colour(0,0,0,0));\r
+ rectangle(area, DrawStyle(0,0,0,0));\r
boxstack->update(this, &area);\r
}\r
\r
{\r
Region r;\r
r.x = posX; r.y = posY; r.w = width; r.h = height;\r
- rectangle(r, Colour(0,0,0,0));\r
+ rectangle(r, DrawStyle(0,0,0,0));\r
boxstack->update(this, &r);\r
}\r
{
public:
VVideoLiveTV(ChannelList* chanList, ULONG initialChannelNumber, VChannelList* vchannelList);
- ~VVideoLiveTV();
+ virtual ~VVideoLiveTV();
void preDelete();
int handleCommand(int command);
void processMessage(Message* m);
Boxx summary;
WTextbox textSummary;
Boxx summaryBlackLine;
+ DrawStyle osdBack;
Region osdSummaryRegion;
doBar(3);\r
return;\r
// int progressWidth = 302 * currentFrameNum / lengthFrames;\r
- // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
}\r
}\r
else\r
{\r
char text[5];\r
SNPRINTF(text, 5, "%ux", scanrate);\r
- drawText(text, barRegion.x + 102, barRegion.y + 12, Colour::LIGHTTEXT);\r
+ drawText(text, barRegion.x + 102, barRegion.y + 12, DrawStyle::LIGHTTEXT);\r
}\r
}\r
\r
time(&t);\r
struct tm* tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, barRegion.x + 624, barRegion.y + 12, Colour::LIGHTTEXT);\r
+ drawText(timeString, barRegion.x + 624, barRegion.y + 12, DrawStyle::LIGHTTEXT);\r
\r
ULLONG lenPTS=player->getLenPTS();\r
// Draw clocks\r
}\r
logger->log("VVideoMedia", Log::DEBUG, "cur %llu,len %llu, txt %s",currentPTS,lenPTS,buffer);\r
\r
- drawText(buffer, clocksRegion.x, clocksRegion.y, Colour::LIGHTTEXT);\r
+ drawText(buffer, clocksRegion.x, clocksRegion.y, DrawStyle::LIGHTTEXT);\r
\r
\r
\r
int progBarXbase = barRegion.x + 300;\r
\r
if (lenPTS == 0) return;\r
- rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, DrawStyle::LIGHTTEXT);\r
rectangle(barRegion.x + progBarXbase + 2, barRegion.y + 14, 306, 20, barBlue);\r
\r
if (currentPTS > lenPTS) return;\r
\r
// Draw yellow portion\r
int progressWidth = 302 * currentPTS / lenPTS;\r
- rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
\r
}\r
\r
VAudioSelector* vas;
- Colour transparent;
- Colour barBlue;
+ DrawStyle transparent;
+ DrawStyle barBlue;
UCHAR videoMode;
void toggleChopSides();
if (loopMark->pos)\r
{\r
posPix = 302 * loopMark->pos / lengthFrames;\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 3, 28, Colour::DANGER);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 3, 28, DrawStyle::DANGER);\r
if (x>=barRegion.x + progBarXbase + 2 + posPix\r
&& x<=barRegion.x + progBarXbase + 2 + posPix+3\r
&& y>=barRegion.y + 12 - 2\r
doBar(3);\r
return;\r
// int progressWidth = 302 * currentFrameNum / lengthFrames;\r
- // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ // rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
}\r
}\r
else\r
{\r
char text[5];\r
SNPRINTF(text, 5, "%ux", scanrate);\r
- drawText(text, barRegion.x + 102, barRegion.y + 12, Colour::LIGHTTEXT);\r
+ drawText(text, barRegion.x + 102, barRegion.y + 12, DrawStyle::LIGHTTEXT);\r
}\r
}\r
\r
time(&t);\r
struct tm* tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawText(timeString, barRegion.x + 624, barRegion.y + 12, Colour::LIGHTTEXT);\r
+ drawText(timeString, barRegion.x + 624, barRegion.y + 12, DrawStyle::LIGHTTEXT);\r
\r
// Draw clocks\r
\r
logger->log("VVideoRec", Log::DEBUG, buffer);\r
}\r
\r
- drawText(buffer, clocksRegion.x, clocksRegion.y, Colour::LIGHTTEXT);\r
+ drawText(buffer, clocksRegion.x, clocksRegion.y, DrawStyle::LIGHTTEXT);\r
\r
\r
\r
// Draw progress bar\r
int progBarXbase = barRegion.x + 300;\r
\r
- rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase, barRegion.y + 12, 310, 24, DrawStyle::LIGHTTEXT);\r
rectangle(barRegion.x + progBarXbase + 2, barRegion.y + 14, 306, 20, barBlue);\r
\r
if (currentFrameNum > lengthFrames) return;\r
\r
// Draw yellow portion\r
int progressWidth = 302 * currentFrameNum / lengthFrames;\r
- rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+ rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 16, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
\r
if (myRec->recInfo->timerEnd > time(NULL)) // if chasing\r
{\r
Log::getInstance()->log("GVASDF", Log::DEBUG, "Length Frames: %lu", lengthFrames);\r
Log::getInstance()->log("GVASDF", Log::DEBUG, "Player lf: %lu", player->getLengthFrames());\r
Log::getInstance()->log("GVASDF", Log::DEBUG, "NR WDITH: %i", nrWidth);\r
- rectangle(barRegion.x + progBarXbase + 4 + 302 - nrWidth, barRegion.y + 16, nrWidth, 16, Colour::RED);\r
+ rectangle(barRegion.x + progBarXbase + 4 + 302 - nrWidth, barRegion.y + 16, nrWidth, 16, DrawStyle::RED);\r
}\r
\r
int posPix;\r
{\r
logger->log("VVideoRec", Log::DEBUG, "Drawing mark at frame %i", loopMark->pos);\r
posPix = 302 * loopMark->pos / lengthFrames;\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 3, 28, Colour::DANGER);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 3, 28, DrawStyle::DANGER);\r
}\r
}\r
}\r
\r
posPix =(int) (302. * myRec->recInfo->fps * ((double)startMargin) /((double) lengthFrames));\r
\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);\r
\r
posPix = (int)(302. * ((double)lengthFrames - ((double)endMargin) * myRec->recInfo->fps) / ((double)lengthFrames));\r
\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, Colour::LIGHTTEXT);\r
- rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, Colour::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 - 2, 2, 2, DrawStyle::LIGHTTEXT);\r
+ rectangle(barRegion.x + progBarXbase + 2 + posPix, barRegion.y + 12 + 24, 2, 2, DrawStyle::LIGHTTEXT);\r
}\r
}\r
\r
VAudioSelector* vas;
- Colour transparent;
- Colour barBlue;
+ DrawStyle transparent;
+ DrawStyle barBlue;
UCHAR videoMode;
void toggleChopSides();
{
Boxx::draw();
- fillColour(Colour::VIEWBACKGROUND);
+ fillColour(DrawStyle::VIEWBACKGROUND);
WSymbol w;
TEMPADD(&w);
}\r
\r
setTitleBarOn(1);\r
- setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+ setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
\r
sl.setPosition(20, 40);\r
sl.setSize(200, 160);\r
time(&t);\r
struct tm* tms = localtime(&t);\r
strftime(timeString, 19, "%H:%M", tms);\r
- drawTextRJ(timeString, 450, 5, Colour::LIGHTTEXT);\r
+ drawTextRJ(timeString, 450, 5, DrawStyle::LIGHTTEXT);\r
\r
time_t dt = 60 - (t % 60); // seconds to the next minute\r
if (dt == 0) dt = 60; // advance a whole minute if necessary\r
{\r
if (dimmed)\r
{\r
- fillColour(Colour::BLACK);\r
- drawTextCentre(mytext, area.w / 2, 0, Colour::SELECTHIGHLIGHT);\r
+ fillColour(DrawStyle::BLACK);\r
+ drawTextCentre(mytext, area.w / 2, 0, DrawStyle::SELECTHIGHLIGHT);\r
}\r
else if (active)\r
{\r
- fillColour(Colour::SELECTHIGHLIGHT);\r
- drawTextCentre(mytext, area.w / 2, 0, Colour::DARKTEXT);\r
+ fillColour(DrawStyle::SELECTHIGHLIGHT);\r
+ drawTextCentre(mytext, area.w / 2, 0, DrawStyle::DARKTEXT);\r
}\r
else\r
{\r
- fillColour(Colour::BUTTONBACKGROUND);\r
- drawTextCentre(mytext, area.w / 2, 0, Colour::LIGHTTEXT);\r
+ fillColour(DrawStyle::BUTTONBACKGROUND);\r
+ drawTextCentre(mytext, area.w / 2, 0, DrawStyle::LIGHTTEXT);\r
}\r
}\r
\r
if (active)
{
- textbox.setForegroundColour(Colour::DARKTEXT);
- textbox.setBackgroundColour(Colour::SELECTHIGHLIGHT);
- leftArrow.nextColour = Colour::SELECTHIGHLIGHT;
- rightArrow.nextColour = Colour::SELECTHIGHLIGHT;
+ textbox.setForegroundColour(DrawStyle::DARKTEXT);
+ textbox.setBackgroundColour(DrawStyle::SELECTHIGHLIGHT);
+ leftArrow.nextColour = DrawStyle::SELECTHIGHLIGHT;
+ rightArrow.nextColour = DrawStyle::SELECTHIGHLIGHT;
}
else
{
- textbox.setForegroundColour(Colour::LIGHTTEXT);
- textbox.setBackgroundColour(Colour::BUTTONBACKGROUND);
- leftArrow.nextColour = Colour::BUTTONBACKGROUND;
- rightArrow.nextColour = Colour::BUTTONBACKGROUND;
+ textbox.setForegroundColour(DrawStyle::LIGHTTEXT);
+ textbox.setBackgroundColour(DrawStyle::BUTTONBACKGROUND);
+ leftArrow.nextColour = DrawStyle::BUTTONBACKGROUND;
+ rightArrow.nextColour = DrawStyle::BUTTONBACKGROUND;
}
textbox.setText(options[currentOption]);
void WOptionPane::draw()
{
Boxx::draw();
- drawText(tr("Press back to exit, <, > or [ok] to change"), 10, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press back to exit, <, > or [ok] to change"), 10, area.h - 30, DrawStyle::LIGHTTEXT);
}
void WOptionPane::saveOpts()
// Hmm, can't draw two boxes because should not paint on areas
// not needing it - this class does not know the background colour
- rectangle(0, 0, area.w, 2, Colour::LIGHTTEXT); // top
- rectangle(0, area.h - 2, area.w, 2, Colour::LIGHTTEXT); // bottom
- rectangle(0, 0, 2, area.h, Colour::LIGHTTEXT); // left
- rectangle(area.w - 2, 0, 2, area.h, Colour::LIGHTTEXT); // right
+ rectangle(0, 0, area.w, 2, DrawStyle::LIGHTTEXT); // top
+ rectangle(0, area.h - 2, area.w, 2, DrawStyle::LIGHTTEXT); // bottom
+ rectangle(0, 0, 2, area.h, DrawStyle::LIGHTTEXT); // left
+ rectangle(area.w - 2, 0, 2, area.h, DrawStyle::LIGHTTEXT); // right
int progressWidth = (int)((area.w - 4) * (float)percent / 100);
- rectangle(2, 2, progressWidth, area.h - 4, Colour::SELECTHIGHLIGHT);
+ rectangle(2, 2, progressWidth, area.h - 4, DrawStyle::SELECTHIGHLIGHT);
}
{
Boxx::draw();
- drawText(tr("Command"), 15, 4, Colour::LIGHTTEXT);
- drawText(tr("Hard wired"), 165, 4, Colour::LIGHTTEXT);
- drawText(tr("User assignable"), 315, 4, Colour::LIGHTTEXT);
+ drawText(tr("Command"), 15, 4, DrawStyle::LIGHTTEXT);
+ drawText(tr("Hard wired"), 165, 4, DrawStyle::LIGHTTEXT);
+ drawText(tr("User assignable"), 315, 4, DrawStyle::LIGHTTEXT);
if (learnmode)
{
- drawText(tr("Learning! Press any hardwired key to exit."), 15, area.h - 30, Colour::SELECTHIGHLIGHT);
+ drawText(tr("Learning! Press any hardwired key to exit."), 15, area.h - 30, DrawStyle::SELECTHIGHLIGHT);
}
else
{
- drawText(tr("Press [ok] for learning or MENU to reset to defaults."), 15, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press [ok] for learning or MENU to reset to defaults."), 15, area.h - 30, DrawStyle::LIGHTTEXT);
}
}
#include "colour.h"\r
#include "log.h"\r
\r
-WSelectList::WSelectList()\r
+WSelectList::WSelectList():\r
+backgroundColour(DrawStyle::VIEWBACKGROUND)\r
{\r
selectedOption = 0;\r
topOption = 0;\r
gap = 1;\r
showseloption = true;\r
darkseloption = false;\r
- backgroundColour = Colour::VIEWBACKGROUND;\r
+\r
}\r
\r
WSelectList::~WSelectList()\r
noLoop = 1;\r
}\r
\r
-void WSelectList::setBackgroundColour(const Colour& colour)\r
+void WSelectList::setBackgroundColour(const DrawStyle& colour)\r
{\r
backgroundColour = colour;\r
}\r
if (i == selectedOption && showseloption)\r
{\r
\r
- rectangle(0, ypos, area.w, fontHeight, darkseloption ? Colour::SELECTDARKHIGHLIGHT: Colour::SELECTHIGHLIGHT);\r
+ rectangle(0, ypos, area.w, fontHeight, darkseloption ? DrawStyle::SELECTDARKHIGHLIGHT: DrawStyle::SELECTHIGHLIGHT);\r
\r
- drawOptionLine(options[i].text, 5, ypos, area.w - 5, Colour::DARKTEXT);\r
+ drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::DARKTEXT);\r
}\r
else\r
{\r
\r
- drawOptionLine(options[i].text, 5, ypos, area.w - 5, Colour::LIGHTTEXT);\r
+ drawOptionLine(options[i].text, 5, ypos, area.w - 5, DrawStyle::LIGHTTEXT);\r
}\r
ypos += ySeperation;\r
}\r
columns[numColumns++] = x;\r
}\r
\r
-void WSelectList::drawOptionLine(char* text, int xpos, int ypos, int width, const Colour& colour)\r
+void WSelectList::drawOptionLine(char* text, int xpos, int ypos, int width, const DrawStyle& colour)\r
{\r
if (!numColumns)\r
{\r
{\r
public:\r
WSelectList();\r
- ~WSelectList();\r
+ virtual ~WSelectList();\r
void clear();\r
void addColumn(int x);\r
\r
void setDarkSelOption(bool set) { darkseloption = set; };\r
int addOption(const char* text, ULONG data, int selected);\r
void draw();\r
- void setBackgroundColour(const Colour& colour);\r
+ void setBackgroundColour(const DrawStyle& colour);\r
\r
void down();\r
void up();\r
virtual bool mouseAndroidScroll(int x, int y,int sx, int sy);\r
\r
private:\r
- void drawOptionLine(char* text, int xpos, int ypos, int width, const Colour& colour);\r
+ void drawOptionLine(char* text, int xpos, int ypos, int width, const DrawStyle& colour);\r
int getMouseLine(int x, int y);\r
\r
vector<wsloption> options;\r
bool showseloption, darkseloption;\r
\r
UINT gap;\r
- Colour backgroundColour;\r
+ DrawStyle &backgroundColour;\r
};\r
\r
#endif\r
WSymbol::WSymbol()
{
nextSymbol = 0;
- nextColour = Colour::LIGHTTEXT;
+ nextColour = DrawStyle::LIGHTTEXT;
}
void WSymbol::draw()
{
buttonBarActive = true;
visiblePane = 0;
- setBackgroundColour(Colour::VIEWBACKGROUND);
+ setBackgroundColour(DrawStyle::VIEWBACKGROUND);
symbolLeft.setPosition(0, 4);
- symbolLeft.nextColour = Colour::BUTTONBACKGROUND;
+ symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;
symbolLeft.nextSymbol = WSymbol::LEFTARROW;
add(&symbolLeft);
symbolRight.setPosition(0, 4); // will be reset in addtab
- symbolRight.nextColour = Colour::BUTTONBACKGROUND;
+ symbolRight.nextColour = DrawStyle::BUTTONBACKGROUND;
symbolRight.nextSymbol = WSymbol::RIGHTARROW;
add(&symbolRight);
}
{
newButton->setActive(false);
boxx->setVisible(false);
- symbolRight.nextColour = Colour::SELECTHIGHLIGHT; // if this is the 2nd+ tab, ensure right arrow goes active
+ symbolRight.nextColour = DrawStyle::SELECTHIGHLIGHT; // if this is the 2nd+ tab, ensure right arrow goes active
}
// WTabbar doesn't know its width during the constructor
{
buttonBarActive = true;
tabs[visiblePane].button->setActive(true);
- if (visiblePane != 0) symbolLeft.nextColour = Colour::SELECTHIGHLIGHT;
- if (visiblePane != tabs.size() - 1) symbolRight.nextColour = Colour::SELECTHIGHLIGHT;
+ if (visiblePane != 0) symbolLeft.nextColour = DrawStyle::SELECTHIGHLIGHT;
+ if (visiblePane != tabs.size() - 1) symbolRight.nextColour = DrawStyle::SELECTHIGHLIGHT;
draw();
return 1;
}
{
buttonBarActive = false;
tabs[visiblePane].button->dim();
- symbolLeft.nextColour = Colour::BUTTONBACKGROUND;
- symbolRight.nextColour = Colour::BUTTONBACKGROUND;
+ symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;
+ symbolRight.nextColour = DrawStyle::BUTTONBACKGROUND;
if (tabs[visiblePane].pane->handleCommand(command) == 1) // shouldn't return anything else at this point?!
{
draw();
tabs[visiblePane].button->setActive(true);
tabs[visiblePane].pane->setVisible(true);
- if (visiblePane == 0) symbolLeft.nextColour = Colour::BUTTONBACKGROUND;
- symbolRight.nextColour = Colour::SELECTHIGHLIGHT;
+ if (visiblePane == 0) symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;
+ symbolRight.nextColour = DrawStyle::SELECTHIGHLIGHT;
// Move the buttons..
if (tabs[visiblePane].button->getVisible() == false)
tabs[visiblePane].button->setActive(true);
tabs[visiblePane].pane->setVisible(true);
- if (visiblePane == tabs.size() - 1) symbolRight.nextColour = Colour::BUTTONBACKGROUND;
- symbolLeft.nextColour = Colour::SELECTHIGHLIGHT;
+ if (visiblePane == tabs.size() - 1) symbolRight.nextColour = DrawStyle::BUTTONBACKGROUND;
+ symbolLeft.nextColour = DrawStyle::SELECTHIGHLIGHT;
// Move the buttons..
if (tabs[visiblePane].button->getVisible() == false)
if (buttonBarActive){
buttonBarActive = false;
tabs[visiblePane].button->dim();
- symbolLeft.nextColour = Colour::BUTTONBACKGROUND;
- symbolRight.nextColour = Colour::BUTTONBACKGROUND;
+ symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;
+ symbolRight.nextColour = DrawStyle::BUTTONBACKGROUND;
}
draw();
if (tabs[visiblePane].pane->mouseLBDOWN(x,y)) {
buttonBarActive = false;
tabs[visiblePane].button->dim();
- symbolLeft.nextColour = Colour::BUTTONBACKGROUND;
- symbolRight.nextColour = Colour::BUTTONBACKGROUND;
+ symbolLeft.nextColour = DrawStyle::BUTTONBACKGROUND;
+ symbolRight.nextColour = DrawStyle::BUTTONBACKGROUND;
draw();
return true;
}
#include "colour.h"
-WTextbox::WTextbox(const char* ttext)
+WTextbox::WTextbox(const char* ttext):
+foreColour(DrawStyle::LIGHTTEXT)
{
// int fontHeight = Surface::getFontHeight();
//setDimensions(70, fontHeight);
//setDimensions(100,100);
setSize(100, 100);
text = NULL;
- foreColour = Colour::LIGHTTEXT;
+
textX = 5;
textY = 2;
strcpy(text, takeText);
}
-void WTextbox::setForegroundColour(const Colour& fcolour)
+void WTextbox::setForegroundColour(const DrawStyle& fcolour)
{
foreColour = fcolour;
}
{
public:
WTextbox(const char* ttext = NULL);
- ~WTextbox();
+ virtual ~WTextbox();
void setText(const char* text);
void draw();
- void setForegroundColour(const Colour& fcolour);
+ void setForegroundColour(const DrawStyle& fcolour);
void setTextPos(int x, int y); // optional
void setParaMode(bool mode);
private:
char* text;
- Colour foreColour;
+ DrawStyle& foreColour;
int textX;
int textY;
bool paraMode;
{
Boxx::draw();
- drawText(tr("Selected Filter:"), 15, 15, Colour::LIGHTTEXT);
+ drawText(tr("Selected Filter:"), 15, 15, DrawStyle::LIGHTTEXT);
int filselected;
AudioWin *aw=(AudioWin*) Audio::getInstance();
const AudioFilterDescList *list=aw->getAudioFilterList(filselected);
- if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,Colour::LIGHTTEXT);
+ if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,DrawStyle::LIGHTTEXT);
sl.draw();
/* if (!(*list)[sl.getCurrentOptionData()].vmr9tested)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::YELLOW);
- drawText(tr("VMR 9 support: ?"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::YELLOW);
+ drawText(tr("VMR 9 support: ?"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else if ((*list)[sl.getCurrentOptionData()].vmr9)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::GREEN);
- drawText(tr("VMR 9 support: yes"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::GREEN);
+ drawText(tr("VMR 9 support: yes"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else
{
- rectangle(area.w - 220, 160, 200, 20, Colour::RED);
- drawText(tr("VMR 9 support: no"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::RED);
+ drawText(tr("VMR 9 support: no"), area.w - 220, 160, DrawStyle::DARKTEXT);
} */
- drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, DrawStyle::LIGHTTEXT);
}
{
Boxx::draw();
- drawText(tr("Selected Filter:"), 15, 15, Colour::LIGHTTEXT);
+ drawText(tr("Selected Filter:"), 15, 15, DrawStyle::LIGHTTEXT);
int filselected;
AudioWin *aw=(AudioWin*) Audio::getInstance();
const AudioFilterDescList *list=aw->getMp3AudioFilterList(filselected);
- if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,Colour::LIGHTTEXT);
+ if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,DrawStyle::LIGHTTEXT);
sl.draw();
/* if (!(*list)[sl.getCurrentOptionData()].vmr9tested)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::YELLOW);
- drawText(tr("VMR 9 support: ?"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::YELLOW);
+ drawText(tr("VMR 9 support: ?"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else if ((*list)[sl.getCurrentOptionData()].vmr9)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::GREEN);
- drawText(tr("VMR 9 support: yes"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::GREEN);
+ drawText(tr("VMR 9 support: yes"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else
{
- rectangle(area.w - 220, 160, 200, 20, Colour::RED);
- drawText(tr("VMR 9 support: no"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::RED);
+ drawText(tr("VMR 9 support: no"), area.w - 220, 160, DrawStyle::DARKTEXT);
} */
- drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, DrawStyle::LIGHTTEXT);
{
Boxx::draw();
- drawText(tr("Selected Filter:"), 15, 15, Colour::LIGHTTEXT);
+ drawText(tr("Selected Filter:"), 15, 15, DrawStyle::LIGHTTEXT);
int filselected;
VideoWin *vw=(VideoWin*) Video::getInstance();
const VideoFilterDescList *list=vw->getVideoFilterList(filselected);
- if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,Colour::LIGHTTEXT);
+ if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,DrawStyle::LIGHTTEXT);
sl.draw();
if (!(*list)[sl.getCurrentOptionData()].vmr9tested)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::YELLOW);
- drawText(tr("VMR 9 support: ?"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::YELLOW);
+ drawText(tr("VMR 9 support: ?"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else if ((*list)[sl.getCurrentOptionData()].vmr9)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::GREEN);
- drawText(tr("VMR 9 support: yes"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::GREEN);
+ drawText(tr("VMR 9 support: yes"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else
{
- rectangle(area.w - 220, 160, 200, 20, Colour::RED);
- drawText(tr("VMR 9 support: no"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::RED);
+ drawText(tr("VMR 9 support: no"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
- drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, DrawStyle::LIGHTTEXT);
}
{
Boxx::draw();
- drawText(tr("Selected Filter:"), 15, 15, Colour::LIGHTTEXT);
+ drawText(tr("Selected Filter:"), 15, 15, DrawStyle::LIGHTTEXT);
int filselected;
VideoWin *vw=(VideoWin*) Video::getInstance();
const VideoFilterDescList *list=vw->getVideoH264FilterList(filselected);
- if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,Colour::LIGHTTEXT);
+ if (filselected!=-1) drawText((*list)[filselected].friendlyname,215,15,DrawStyle::LIGHTTEXT);
sl.draw();
if (!(*list)[sl.getCurrentOptionData()].vmr9tested)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::YELLOW);
- drawText(tr("VMR 9 support: ?"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::YELLOW);
+ drawText(tr("VMR 9 support: ?"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else if ((*list)[sl.getCurrentOptionData()].vmr9)
{
- rectangle(area.w - 220, 160, 200, 20, Colour::GREEN);
- drawText(tr("VMR 9 support: yes"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::GREEN);
+ drawText(tr("VMR 9 support: yes"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
else
{
- rectangle(area.w - 220, 160, 200, 20, Colour::RED);
- drawText(tr("VMR 9 support: no"), area.w - 220, 160, Colour::DARKTEXT);
+ rectangle(area.w - 220, 160, 200, 20, DrawStyle::RED);
+ drawText(tr("VMR 9 support: no"), area.w - 220, 160, DrawStyle::DARKTEXT);
}
- drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, Colour::LIGHTTEXT);
+ drawText(tr("Press [ok] to select filter! "), 15, area.h - 30, DrawStyle::LIGHTTEXT);
}