]> git.vomp.tv Git - vompclient-marten.git/commitdiff
Interface changes, introducing DrawStyle, preparation for Vector based OSD
authorMarten Richter <marten.richter@freenet.de>
Fri, 21 Sep 2012 18:39:35 +0000 (20:39 +0200)
committerMarten Richter <marten.richter@freenet.de>
Fri, 21 Sep 2012 18:39:35 +0000 (20:39 +0200)
61 files changed:
boxx.cc
boxx.h
colour.cc
colour.h
command.cc
surface.cc
surface.h
surfacemvp.cc
surfacemvp.h
surfaceopengl.cc
surfaceopengl.h
surfacewin.cc
surfacewin.h
tbboxx.cc
tbboxx.h
vaudioselector.cc
vaudioselector.h
vchannellist.cc
vchannelselect.cc
vepg.cc
vepg.h
vepgsettimer.cc
vinfo.cc
vmute.cc
vopts.cc
vpicturebanner.cc
vquestion.cc
vradiorec.cc
vradiorec.h
vrecmove.cc
vrecording.cc
vrecordinglist.cc
vrecordingmenu.cc
vscreensaver.cc
vserverselect.cc
vsleeptimer.cc
vtimeredit.cc
vtimerlist.cc
vvideolivetv.cc
vvideolivetv.h
vvideomedia.cc
vvideomedia.h
vvideorec.cc
vvideorec.h
vvolume.cc
vwelcome.cc
wbutton.cc
woptionbox.cc
woptionpane.cc
wprogressbar.cc
wremoteconfig.cc
wselectlist.cc
wselectlist.h
wsymbol.cc
wtabbar.cc
wtextbox.cc
wtextbox.h
wwinaudiofilter.cc
wwinmp3audiofilter.cc
wwinvideofilter.cc
wwinvideoh264filter.cc

diff --git a/boxx.cc b/boxx.cc
index e8ca58adee32dd3f42aef607ef34ba46de3bf070..1e0935f0a0d0dea306f921d6c411c2d6e90b2282 100644 (file)
--- a/boxx.cc
+++ b/boxx.cc
@@ -113,7 +113,7 @@ void Boxx::setParent(Boxx* newParent)
   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
@@ -234,12 +234,12 @@ void Boxx::getRootBoxRegion(Region* 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
@@ -315,41 +315,41 @@ void Boxx::drawPara(const char* text, int x, int y, const Colour& colour)
   }\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
diff --git a/boxx.h b/boxx.h
index 02f8f5f9d028db19050d8544ef8ba7a54ee1287e..a97c8959170cdda38e8564807afaaca5a65e8588 100644 (file)
--- a/boxx.h
+++ b/boxx.h
@@ -49,7 +49,7 @@ class Boxx
     \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
@@ -90,17 +90,17 @@ class Boxx
     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
@@ -146,7 +146,7 @@ class Boxx
     static const int paraMargin = 10;\r
     UINT paraVSpace;\r
 \r
-    Colour backgroundColour;\r
+    DrawStyle backgroundColour;\r
     bool backgroundColourSet;\r
     bool visible;\r
 \r
index f1b8f68beb37a2e40d739bbcf044f6b98e8098bf..82bfa8390a706fb3588298e5211f10b9864d407f 100644 (file)
--- a/colour.cc
+++ b/colour.cc
 /*
 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
 
 
 /*
index 9c9687cb7d47084b5812e60d79f9e445ba9cc40a..9f358c37877b45575c900ceb2c83b3d45dd45514 100644 (file)
--- a/colour.h
+++ b/colour.h
@@ -39,7 +39,7 @@ class 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;
     }
@@ -49,26 +49,43 @@ class Colour
     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
index c7ce89cb177d5f82b6250d1fdedad7ecad85c5b5..a60e39f774e08bcb1a1a38d93e851ddc6d49a793 100644 (file)
@@ -132,7 +132,7 @@ void Command::doWallpaper()
   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
@@ -566,7 +566,7 @@ void Command::doFromTheTop(bool which)
     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
@@ -633,7 +633,7 @@ void Command::buildCrashedBox()
     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
index 6860cfacb2780456bc60be3de650eea181a59530..f8556fae824ec02d381e9129bf68d3c7d1f307db 100644 (file)
@@ -89,12 +89,12 @@ Surface* Surface::getScreen()
   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
@@ -104,6 +104,7 @@ int Surface::drawText(const char* text, int x, int y, int width, ULONG rgba)
 \r
   X = 0;\r
   cx = 0;\r
+  ULONG rgba=c.rgba();\r
   startFastDraw();\r
   for (i=0; i<n; i++)\r
   {\r
@@ -129,7 +130,7 @@ int Surface::drawText(const char* text, int x, int y, int width, ULONG rgba)
   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
@@ -144,10 +145,10 @@ int Surface::drawTextRJ(const char* text, int x, int y, ULONG rgba)
   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
@@ -162,7 +163,7 @@ int Surface::drawTextCentre(const char* text, int x, int y, ULONG rgba)
   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
index 3399fea006ca7bdeadee3a6c86683d3a744efdf1..294f6a6cfd2d174eba5b998de4f4349bfe3f9c7b 100644 (file)
--- a/surface.h
+++ b/surface.h
@@ -58,19 +58,19 @@ class Surface
     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
index c0fe85b6f16e46cca54d558e7797e91f844c675d..d7d4fc7a57cf9628154463871dc565653c80c691 100644 (file)
@@ -186,7 +186,7 @@ void SurfaceMVP::initConversionTables(int rfactor, int gfactor, int bfactor)
   }
 }
 
-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;
 
@@ -195,7 +195,7 @@ int SurfaceMVP::fillblt(int x, int y, int width, int height, unsigned int c)
   fblt.y = y;
   fblt.width = width;
   fblt.height = height;
-  fblt.colour = c;
+  fblt.colour = c.rgba();
 
   return ioctl(fdOsd, GFX_FB_OSD_FILLBLT, &fblt);
 }
@@ -253,12 +253,12 @@ void SurfaceMVP::drawPixel(int x, int y, Colour& c, bool fastdraw)
   *(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);
 }
index a2d2626d7f7980922dca1eba9daba6b4ca15baec..1bcb37dfe2114373b25648405cd7034f9b854619 100644 (file)
@@ -160,10 +160,10 @@ class SurfaceMVP : public Surface
     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
index df2eb8d197694fcaf084d45507e09ea444e5bf72..f1348a089f68ed6ebbcabf60ef97aec202ba261b 100644 (file)
@@ -93,7 +93,7 @@ void SurfaceOpenGL::display()
 {\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
@@ -112,7 +112,7 @@ int SurfaceOpenGL::fillblt(int x, int y, int width, int height, unsigned int c)
        //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
@@ -188,12 +188,12 @@ void SurfaceOpenGL::drawPixel(int x, int y, unsigned int c, bool fastdraw) {
 \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
index 48b350922ff6d904aa7985068c66ad2f48ec525e..51198c9b10386a50da67182dee36e658feff3773 100644 (file)
@@ -38,10 +38,10 @@ class SurfaceOpenGL : public Surface
     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
index 373a0c780874e4d7a89dc995f213437880784460..c3477debd8ba6662463475aecf5d3a6bed1fdb8c 100644 (file)
@@ -92,7 +92,7 @@ void SurfaceWin::display()
 {\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
@@ -101,6 +101,7 @@ int SurfaceWin::fillblt(int x, int y, int width, int height, unsigned int c)
   if (!d3dsurface) {\r
     return 0; //why does this happen\r
   }\r
+  ULONG col=c.rgba();\r
 \r
   LPDIRECT3DDEVICE9 d3ddev=osd->getD3dDev();\r
 \r
@@ -126,7 +127,7 @@ int SurfaceWin::fillblt(int x, int y, int width, int height, unsigned int c)
     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
@@ -225,12 +226,12 @@ void SurfaceWin::drawPixel(int x, int y, unsigned int c, bool fastdraw)
 \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
index 2058308e24e89122863085333f0d30fe81ce67b6..0692c7a35bc0331bd11550a34dff31c5f474d475 100644 (file)
@@ -38,9 +38,9 @@ class SurfaceWin : public Surface
     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
index 1438890168243ba0095bab5d31a9931530c76a74..1a39b9717b7467a863f67a3464e062d86742100e 100644 (file)
--- a/tbboxx.cc
+++ b/tbboxx.cc
@@ -47,12 +47,12 @@ void TBBoxx::draw()
 {
   //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)
@@ -60,15 +60,15 @@ void TBBoxx::draw()
     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;
 }
index cde6cdd7a7d22d29d17b287f7915f99b9dbcfedb..182366eeca52345bf7c567bf0081fd81dd376b23 100644 (file)
--- a/tbboxx.h
+++ b/tbboxx.h
@@ -41,7 +41,7 @@ class TBBoxx : public Boxx
     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:
@@ -50,7 +50,7 @@ class TBBoxx : public Boxx
     int titleBarTextWidth;
 
   protected:
-    Colour titleBarColour;
+    DrawStyle titleBarColour;
     UCHAR titleBarOn;
 };
 
index 4908b4f4aca7c5224a469066ac9b9633b4f601b4..c6103c7a58d5ecbfd9dcafa16d8c761e2e581e9d 100644 (file)
@@ -448,10 +448,10 @@ void VAudioSelector::draw()
   
   // 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();
   }
index 09d8afc48c3cbe099af67d22dca00e690be989a9..bf2f36dc2471a57e4e31164edb7c9b62782fe425 100644 (file)
@@ -66,7 +66,7 @@ class VAudioSelector : public TBBoxx
 
     VAudioSelector(void* parent, Channel* channel);
 
-    ~VAudioSelector();
+    virtual ~VAudioSelector();
 
     int handleCommand(int command);
     void processMessage(Message* m);
index 3ec7713a3c9548f084fb47754644577f2fd4f94b..d49955cae3c0243f8a95219e9b18b2fb63b47074 100644 (file)
@@ -55,7 +55,7 @@ VChannelList::VChannelList(ULONG type)
   {
     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);
@@ -149,8 +149,8 @@ void VChannelList::doShowingBar()
   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)
index 5408ee1a36b7100b0c92eae4d717ced2a493bd48..8871008b84b8daf26d65c64f8c3365c13e81df1b 100644 (file)
@@ -45,7 +45,7 @@ VChannelSelect::VChannelSelect(Boxx* v)
   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()
@@ -82,12 +82,12 @@ void VChannelSelect::draw()
   {
     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);
     }
   }
 }
diff --git a/vepg.cc b/vepg.cc
index 5505eb815b1d2afbdcd13a7163b846019d5f08ce..a8c79b2843e5bfbba1a9087de2fc448f3e8d92d3 100644 (file)
--- a/vepg.cc
+++ b/vepg.cc
@@ -106,19 +106,19 @@ VEpg::VEpg(void* tparent, UINT tcurrentChannelIndex, ULONG streamType)
   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
@@ -127,7 +127,7 @@ VEpg::VEpg(void* tparent, UINT tcurrentChannelIndex, ULONG streamType)
 //  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
@@ -227,7 +227,7 @@ void VEpg::draw()
 {\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
@@ -237,7 +237,7 @@ void VEpg::draw()
 \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
@@ -259,43 +259,43 @@ void VEpg::draw()
   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
@@ -313,7 +313,7 @@ void VEpg::drawData()
     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
@@ -529,7 +529,7 @@ void VEpg::drawgrid() // redraws grid and select programme
     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
@@ -537,29 +537,29 @@ void VEpg::drawgrid() // redraws grid and select programme
   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
@@ -573,7 +573,7 @@ void VEpg::drawgrid() // redraws grid and select programme
   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
@@ -583,7 +583,7 @@ void VEpg::drawgrid() // redraws grid and select programme
     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
@@ -597,7 +597,7 @@ void VEpg::drawgrid() // redraws grid and select programme
       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
@@ -607,7 +607,7 @@ void VEpg::drawgrid() // redraws grid and select programme
           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
@@ -619,8 +619,8 @@ void VEpg::drawgrid() // redraws grid and select programme
             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
@@ -641,14 +641,14 @@ void VEpg::drawgrid() // redraws grid and select programme
       // 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
@@ -681,7 +681,7 @@ void VEpg::setCurrentChannel()
   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
@@ -725,7 +725,7 @@ void VEpg::paintCell(Event* event, int yOffset, const Colour& bg, const Colour&
   {\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
diff --git a/vepg.h b/vepg.h
index edef8a6f49a72e2040c02e93fce7a84d9b8fd13e..2f37e3ff14ed2cac912723263dbec14f1383ce12 100644 (file)
--- a/vepg.h
+++ b/vepg.h
@@ -80,7 +80,7 @@ class VEpg : public Boxx, public TimerReceiver
     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;
index 4e00ab62c0db956170ededbb2254cd975de237df..0a2d714712340f6095d3dcfbc78f206c08b82903 100644 (file)
@@ -53,7 +53,7 @@ VEpgSetTimer::VEpgSetTimer(Event* tevent, Channel* tchannel)
   }
 
   setTitleBarOn(1);
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
   setBorderOn(true);
   setTitleText(tr("Set Timer"));
 
@@ -173,8 +173,8 @@ void VEpgSetTimer::swap()
 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;
@@ -197,8 +197,8 @@ void VEpgSetTimer::draw()
 
   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();
index eb05c00a58802524723dd09d67f3cd92d6a8efa1..202a6d1d7ec5874f64584bc1908ca6114325ab90 100644 (file)
--- a/vinfo.cc
+++ b/vinfo.cc
@@ -32,7 +32,7 @@ VInfo::VInfo()
   dropThrough = 0;
 
   setTitleBarOn(1);
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
 }
 
 VInfo::~VInfo()
@@ -74,13 +74,13 @@ void VInfo::draw()
   {
     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);
     }
   }
 }
index 043a3ce418ada4e94f3bd99d38540ec2b2d2b5e8..c371cafb7af053786133ac2f187c877bb7dc50ad 100644 (file)
--- a/vmute.cc
+++ b/vmute.cc
@@ -54,7 +54,7 @@ VMute::~VMute()
 void VMute::draw()
 {
   // draw background?
-  fillColour(Colour::VIEWBACKGROUND);
+  fillColour(DrawStyle::VIEWBACKGROUND);
 
   WSymbol w;
   TEMPADD(&w);
index 57419ce30bda10f7442b9bc2f1667be6a0dd5f03..2772167024d35144c5312b61bdf143235f1dc5b8 100644 (file)
--- a/vopts.cc
+++ b/vopts.cc
@@ -41,7 +41,7 @@
 VOpts::VOpts()\r
 {\r
   setTitleBarOn(1);\r
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
   setTitleText(tr("Options"));\r
 \r
 \r
index ba800e2ed024bd0864bc7ed60b12cf4ce4be22ba..c1ceef62eb4c87ddf928b6f41b42886e714f6644 100644 (file)
@@ -57,19 +57,19 @@ void VPictureBanner::draw()
 //  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);
@@ -83,7 +83,7 @@ void VPictureBanner::draw()
     w.draw();
     x+=20+3;
     if (info) {
-      drawText(info,x,area.h - 25,Colour::LIGHTTEXT);
+      drawText(info,x,area.h - 25,DrawStyle::LIGHTTEXT);
     }
   }
 }
index 6ad12b6db4ddcfa43124d4c1a5f800855220e5d2..5dca6c4e7d440699dd589bfd07945ee9779cda51 100644 (file)
@@ -59,7 +59,7 @@ void VQuestion::draw()
 {
   TBBoxx::draw();
 
-  if (mainText) drawPara(mainText, 10, 45, Colour::LIGHTTEXT);
+  if (mainText) drawPara(mainText, 10, 45, DrawStyle::LIGHTTEXT);
 }
 
 void VQuestion::swap()
index ec0d3a5eae1784c57bbbe24ba34b2f59fb184ea4..566274e2953d0a5691188b0a16eca335a70c5f58 100644 (file)
@@ -112,7 +112,7 @@ VRadioRec::~VRadioRec()
 \r
 void VRadioRec::draw()\r
 {\r
-  fillColour(Colour::BLACK);\r
+  fillColour(DrawStyle::BLACK);\r
 }\r
 \r
 void VRadioRec::go()\r
@@ -288,7 +288,7 @@ void VRadioRec::processMessage(Message* m)
         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
@@ -429,7 +429,7 @@ void VRadioRec::drawBarClocks()
   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
@@ -492,12 +492,12 @@ void VRadioRec::drawBarClocks()
     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
@@ -505,7 +505,7 @@ void VRadioRec::drawBarClocks()
 \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
@@ -515,7 +515,7 @@ void VRadioRec::drawBarClocks()
     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
@@ -527,13 +527,13 @@ void VRadioRec::drawBarClocks()
   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
@@ -541,7 +541,7 @@ void VRadioRec::removeBar()
   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
index eeaaf4c3b8bc91c29f6b3c1f343bfe66dcf5d8fc..70bf3ece8c535f02f765fa0cb31c8e15e97ed8b0 100644 (file)
@@ -58,7 +58,7 @@ class VRadioRec : public Boxx, public TimerReceiver
     Recording* myRec;
     BoxStack* boxstack;
 
-    Colour barBlue;
+    DrawStyle barBlue;
 
     bool playing;
     bool barShowing;
index 0ba3b165b586ba30d8b794e1eee69ba62a985fff..61f132c09a3a9beb19b6c8e4af8dfd21acea16a8 100644 (file)
@@ -52,7 +52,7 @@ VRecMove::VRecMove(RecMan* trecman)
   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);
@@ -92,7 +92,7 @@ void VRecMove::draw()
 {
   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);
 
index 104ff5bc7d97c8f5e6f7bf20b1456ef3afaa9d95..c3b2461b2569545050a15561f258adf7b7680410 100644 (file)
@@ -60,7 +60,7 @@ VRecording::VRecording(RecMan* trecman, Recording* trec)
   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
@@ -177,7 +177,7 @@ int VRecording::handleCommand(int command)
         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
index f46050cdee6f3c3dfca16df525c078c1fc73aece..5e872c6499a217571fefbd483f26a6ed7660629e 100644 (file)
@@ -56,7 +56,7 @@ VRecordingList::VRecordingList()
   }\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
@@ -147,14 +147,14 @@ void VRecordingList::draw(bool doIndexPop)
 \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
@@ -174,7 +174,7 @@ void VRecordingList::draw(bool doIndexPop)
     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
@@ -186,10 +186,10 @@ void VRecordingList::doShowingBar()
   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
@@ -269,7 +269,7 @@ void VRecordingList::doDeleteSelected()
     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
@@ -309,7 +309,7 @@ void VRecordingList::doMoveRecording(Directory* toDir)
     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
@@ -354,7 +354,7 @@ int VRecordingList::doPlay(bool resume)
                        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
index a527f53bd1effedb5bb44f99a2597eff0e65070c..d78c9efb95e9f037263569a36bc457aafd594e88 100644 (file)
@@ -55,7 +55,7 @@ VRecordingMenu::VRecordingMenu(RecMan* trecman)
   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);
@@ -163,7 +163,7 @@ int VRecordingMenu::handleCommand(int command)
         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"));
index 2c6c86b2b0e52903b8a3fa99d4d889739bd5aaf6..91e8543191f737411329ac9c5f2b043b909fa715 100644 (file)
@@ -46,7 +46,7 @@ VScreensaver::~VScreensaver()
 
 void VScreensaver::draw()
 {
-  fillColour(Colour::BLACK);
+  fillColour(DrawStyle::BLACK);
   threadStart();
 }
 
@@ -83,6 +83,9 @@ void VScreensaver::threadMethod()
   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;
@@ -91,7 +94,7 @@ void VScreensaver::threadMethod()
     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;
@@ -110,7 +113,7 @@ void VScreensaver::threadMethod()
     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);
   }
 }
index 16f4b0c3ceaeb8a4013579a54ab7180be1f315e4..f1922be4b2e5602c1abbebff3090e2c5c73cf107 100644 (file)
@@ -48,7 +48,7 @@ VServerSelect::VServerSelect(vector<VDRServer>& servers, void* treplyTo)
   }
 
   setTitleBarOn(1);
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
   setTitleText(tr("Choose a VDR server"));
 
   sl.setPosition(10, 30 + 5);
index d4ab1ca5d42df8e981ba57fa29be5138bc72de95..964ac26c98facc707796b0b1f64a8a7242397ba6 100644 (file)
@@ -223,7 +223,7 @@ VSleeptimer::~VSleeptimer()
 
 void VSleeptimer::draw()
 {
-   fillColour(Colour::VIEWBACKGROUND);
+   fillColour(DrawStyle::VIEWBACKGROUND);
    WSymbol w;
    TEMPADD(&w);
    w.nextSymbol = WSymbol::CLOCK;
@@ -231,7 +231,7 @@ void VSleeptimer::draw()
    w.draw();
  
    Boxx::draw();
-   drawText(displaySleeptimer,50,2,Colour::LIGHTTEXT);
+   drawText(displaySleeptimer,50,2,DrawStyle::LIGHTTEXT);
    Timers::getInstance()->setTimerD(this, 1, 2);
 }
 
@@ -290,16 +290,16 @@ VCountdown::~VCountdown()
 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);
 }
 
index 9b8ae1cf4828ef82d4b43fc578366b239f1def1c..6f5aa2047a9a78a2d98cac90602fb3725b745119 100644 (file)
@@ -56,7 +56,7 @@ VTimerEdit::VTimerEdit(RecTimer* trt)
 
   setTitleBarOn(1);
   setTitleText(tr("Edit Timer"));
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
 }
 
 VTimerEdit::~VTimerEdit()
@@ -75,18 +75,18 @@ void VTimerEdit::draw()
   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
@@ -98,50 +98,50 @@ void VTimerEdit::draw()
   // 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()
@@ -206,7 +206,7 @@ int VTimerEdit::handleCommand(int command)
       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");
index 3eb5f1e99f74a4a9eed4bc51796e838638c30550..2cc3558cbc9613f07930c28e1b314082726c8f77 100644 (file)
@@ -66,7 +66,7 @@ VTimerList::VTimerList()
 \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
@@ -117,7 +117,7 @@ void VTimerList::draw()
   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
@@ -167,7 +167,7 @@ void VTimerList::drawClock()
   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
@@ -177,10 +177,10 @@ void VTimerList::drawShowing()
   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
@@ -190,7 +190,7 @@ void VTimerList::drawIndicators()
   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
@@ -205,23 +205,23 @@ void VTimerList::drawIndicators()
     {\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
@@ -359,7 +359,7 @@ void VTimerList::processMessage(Message* m)
 \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
index af5ac6de2005eda1339096454a2f5f5d844ff504..6e0771a1862a772c17a946175e0e4c237c530002 100644 (file)
@@ -44,6 +44,7 @@
 #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
@@ -93,7 +94,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
 \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
@@ -121,8 +122,8 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   // 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
@@ -144,22 +145,22 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   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
@@ -210,13 +211,13 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   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
@@ -226,7 +227,7 @@ VVideoLiveTV::VVideoLiveTV(ChannelList* tchanList, ULONG initialChannelNumber, V
   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
@@ -645,7 +646,7 @@ void VVideoLiveTV::doAudioSelector()
   // 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
@@ -1186,7 +1187,7 @@ void VVideoLiveTV::drawOSDBitmap(UINT posX, UINT posY, const Bitmap& bm)
 \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
@@ -1194,6 +1195,6 @@ void VVideoLiveTV::clearOSDArea(UINT posX, UINT posY, UINT width, UINT height)
 {\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
index 74730863d1b790e214c06793b3cd51430086cbb0..3c9eede355c51b477b0ee81dfc7a15bca053ebc9 100644 (file)
@@ -52,7 +52,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver, public OSDReceiver
 {
   public:
     VVideoLiveTV(ChannelList* chanList, ULONG initialChannelNumber, VChannelList* vchannelList);
-    ~VVideoLiveTV();
+    virtual ~VVideoLiveTV();
     void preDelete();
     int handleCommand(int command);
     void processMessage(Message* m);
@@ -148,6 +148,7 @@ class VVideoLiveTV : public Boxx, public TimerReceiver, public OSDReceiver
     Boxx summary;
     WTextbox textSummary;
     Boxx summaryBlackLine;
+    DrawStyle osdBack;
     
     Region osdSummaryRegion;
     
index 9365a7c4c045c740bf22764ce2161cf83852a646..f4b069edfee99b071f2101904116cae08370ec03 100644 (file)
@@ -356,7 +356,7 @@ void VVideoMedia::processMessage(Message* m)
         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
@@ -559,7 +559,7 @@ void VVideoMedia::doBar(int action)
     {\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
@@ -617,7 +617,7 @@ void VVideoMedia::drawBarClocks()
   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
@@ -640,7 +640,7 @@ void VVideoMedia::drawBarClocks()
   }\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
@@ -652,14 +652,14 @@ void VVideoMedia::drawBarClocks()
   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
index 3572e0e4c4f1321d9e111bf4b607dfa340f00b74..bc3a932e02d92679e99217fd74a4b483b918be15 100644 (file)
@@ -63,8 +63,8 @@ class VVideoMedia : public Boxx, public TimerReceiver
 
     VAudioSelector* vas;
 
-    Colour transparent;
-    Colour barBlue;
+    DrawStyle transparent;
+    DrawStyle barBlue;
 
     UCHAR videoMode;
     void toggleChopSides();
index faafb652b785d4dd055a17a449e52478d1439f34..782432962d9a07f7e5597d7ec93ebb4ac1861823 100644 (file)
@@ -481,7 +481,7 @@ void VVideoRec::processMessage(Message* m)
           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
@@ -506,7 +506,7 @@ void VVideoRec::processMessage(Message* m)
         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
@@ -844,7 +844,7 @@ void VVideoRec::doBar(int action)
     {\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
@@ -931,7 +931,7 @@ void VVideoRec::drawBarClocks()
   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
@@ -964,7 +964,7 @@ void VVideoRec::drawBarClocks()
     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
@@ -975,7 +975,7 @@ void VVideoRec::drawBarClocks()
   // 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
@@ -983,7 +983,7 @@ void VVideoRec::drawBarClocks()
 \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
@@ -992,7 +992,7 @@ void VVideoRec::drawBarClocks()
     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
@@ -1012,7 +1012,7 @@ void VVideoRec::drawBarClocks()
       {\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
@@ -1022,13 +1022,13 @@ void VVideoRec::drawBarClocks()
 \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
index 383b8ef555dac165b4bda64af133ce263bc20d9e..ab7dd6f1c22499ca0c63754106d9c355fa6ece08 100644 (file)
@@ -80,8 +80,8 @@ class VVideoRec : public Boxx, public TimerReceiver, public OSDReceiver
 
     VAudioSelector* vas;
 
-    Colour transparent;
-    Colour barBlue;
+    DrawStyle transparent;
+    DrawStyle barBlue;
 
     UCHAR videoMode;
     void toggleChopSides();
index c68b7a44e9131362b12b6e30adf8df56672122f2..02cbf745b8b7d826700c8f1ec87c8fc2b5ac5a68 100644 (file)
@@ -55,7 +55,7 @@ void VVolume::draw()
 {
   Boxx::draw();
 
-  fillColour(Colour::VIEWBACKGROUND);
+  fillColour(DrawStyle::VIEWBACKGROUND);
 
   WSymbol w;
   TEMPADD(&w);
index 28cc489a80199e198a8c570fdcd7ce6ea0b44602..258bb56b29defd6f2f6b7b51d948fb25ddb5b555 100644 (file)
@@ -59,7 +59,7 @@ VWelcome::VWelcome()
   }\r
 \r
   setTitleBarOn(1);\r
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);\r
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);\r
 \r
   sl.setPosition(20, 40);\r
   sl.setSize(200, 160);\r
@@ -118,7 +118,7 @@ void VWelcome::drawClock()
   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
index 5f4a6fc6f2b8ac4abf71c80f6bfb015972a90258..40d74e23f6e2545838cf879a203602f978a7f2ad 100644 (file)
@@ -62,18 +62,18 @@ void WButton::draw()
 {\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
index 6e43230527cf6b6ae07b0ce8d4a47167d5288ca6..9d1316ff8f98fff4fc161cdea1915cf73fe2c03d 100644 (file)
@@ -76,17 +76,17 @@ void WOptionBox::setData()
 
   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]);
 
index 00df78234c568c443943d03a927383b52f8446b9..690ab793caba4ac7ebfb28066079f97c0486a5ce 100644 (file)
@@ -45,7 +45,7 @@ WOptionPane::~WOptionPane()
 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()
index b025a8850ecd2cf28db8de0a0053f90c9c384933..9ce9892936057c1833a032af2037a8958043563a 100644 (file)
@@ -45,12 +45,12 @@ void WProgressBar::draw()
   // 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);
 }
 
index 3d6e7ef7dfa66c4391942466822e929691aa57c6..f982b7fda86230ba001e12883c7ba215814a6cfc 100644 (file)
@@ -85,17 +85,17 @@ void WRemoteConfig::draw()
 {
   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);
   }
 }
 
index 73177f45748da3adef6a210e79a39283552ec9da..9707b9948358179abbb6a0e110c7d532de1dc55e 100644 (file)
@@ -23,7 +23,8 @@
 #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
@@ -33,7 +34,7 @@ WSelectList::WSelectList()
   gap = 1;\r
   showseloption = true;\r
   darkseloption = false;\r
-  backgroundColour = Colour::VIEWBACKGROUND;\r
+\r
 }\r
 \r
 WSelectList::~WSelectList()\r
@@ -61,7 +62,7 @@ void WSelectList::setNoLoop()
   noLoop = 1;\r
 }\r
 \r
-void WSelectList::setBackgroundColour(const Colour& colour)\r
+void WSelectList::setBackgroundColour(const DrawStyle& colour)\r
 {\r
   backgroundColour = colour;\r
 }\r
@@ -119,14 +120,14 @@ void WSelectList::draw()
     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
@@ -139,7 +140,7 @@ void WSelectList::addColumn(int x)
   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
index c27f73eebff0b0f95f0b7b519cbc70dd32298448..9d5a62b95183151b42680e9c9636309ed7910e2b 100644 (file)
@@ -41,7 +41,7 @@ class WSelectList : public Boxx
 {\r
   public:\r
     WSelectList();\r
-    ~WSelectList();\r
+    virtual ~WSelectList();\r
     void clear();\r
     void addColumn(int x);\r
 \r
@@ -50,7 +50,7 @@ class WSelectList : public Boxx
     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
@@ -71,7 +71,7 @@ class WSelectList : public Boxx
     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
@@ -84,7 +84,7 @@ class WSelectList : public Boxx
     bool showseloption, darkseloption;\r
     \r
     UINT gap;\r
-    Colour backgroundColour;\r
+    DrawStyle &backgroundColour;\r
 };\r
 \r
 #endif\r
index 6d4035f7af6d167fa531fcd781884641d8935177..99b08572be0775d8c57abd72ce6af27b4ffa9ca5 100644 (file)
@@ -1060,7 +1060,7 @@ UCHAR WSymbol::symbols[] = {
 WSymbol::WSymbol()
 {
   nextSymbol = 0;
-  nextColour = Colour::LIGHTTEXT;
+  nextColour = DrawStyle::LIGHTTEXT;
 }
 
 void WSymbol::draw()
index eb8ec53af15184e6be00ad0e6118b853d9bea409..a33bae775d11d736cd9cc622777dc27647f6ef98 100644 (file)
@@ -28,15 +28,15 @@ WTabBar::WTabBar()
 {
   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);
 }
@@ -88,7 +88,7 @@ void WTabBar::addTab(const char* name, Boxx* boxx)
   {
     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
@@ -124,8 +124,8 @@ int WTabBar::handleCommand(int command)
     {
       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;
     }
@@ -154,8 +154,8 @@ int WTabBar::handleCommand(int command)
       {
         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();
@@ -178,8 +178,8 @@ bool WTabBar::left()
   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)
@@ -212,8 +212,8 @@ bool WTabBar::right()
   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)
@@ -256,8 +256,8 @@ bool WTabBar::mouseMove(int x, int y) {
         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();
@@ -287,8 +287,8 @@ bool WTabBar::mouseLBDOWN(int x, int y) {
     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;
     }
index d065760ae6bd37418383a92aeea6fd379f8bfb5f..048bec041a5a6c532907b72240f7c12df3c25cec 100644 (file)
 
 #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;
   
@@ -56,7 +57,7 @@ void WTextbox::setText(const char* takeText)
   strcpy(text, takeText);
 }
 
-void WTextbox::setForegroundColour(const Colour& fcolour)
+void WTextbox::setForegroundColour(const DrawStyle& fcolour)
 {
   foreColour = fcolour;
 }
index bf378bf777de95a0193a8a3504dcffd883bc3f09..3bab197868462aa600050cb395e2eda1bd1071f9 100644 (file)
@@ -33,17 +33,17 @@ class WTextbox : public Boxx
 {
   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;
index 301e82dd1f5c947c3831fadca34f60dfcc78d051..126d93f552025b4ef6957126a2919fffea4c8565 100644 (file)
@@ -81,30 +81,30 @@ void WWinAudioFilter::draw()
 {
     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);
 
 }
 
index 69db75ed3c47770fb814c4ef453f5e0b5ab71e3d..891f05e25e66943a0418126ddb097f803d62b024 100644 (file)
@@ -85,30 +85,30 @@ void WWinMp3AudioFilter::draw()
 {
   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);
   
 
   
index 7ec49111b4c1bc7d11e3ef9da86fd8193aab4d96..718b9fa419af2b4b31873aa5e77bfe98eeb13fd5 100644 (file)
@@ -81,30 +81,30 @@ void WWinVideoFilter::draw()
 {
   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);
   
 }
 
index a4a67dabd0244295d879c92ae2a5cb5f72b26013..401fb1fe43bddec3a501cfe5908167d94d1f618f 100644 (file)
@@ -81,30 +81,30 @@ void WWinVideoH264Filter::draw()
 {
   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);
   
 }