- default fonts handled in windowstyle
[enigma2.git] / lib / gui / ewindowstyle.h
index 74ff88d5ebb040729262b7aaabfa53da350ce4dc..f11d99de8449b7649fefc69c2d8ebd453b5cf714 100644 (file)
@@ -17,7 +17,8 @@ public:
        enum {
                styleLabel,
                styleListboxSelected,
-               styleListboxNormal
+               styleListboxNormal,
+               styleListboxMarked
        };
        
        virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
@@ -26,13 +27,20 @@ public:
                frameButton,
                frameListboxEntry
        };
+       
+       enum {
+               fontStatic,
+               fontButton,
+               fontTitlebar
+       };
+       
+       virtual RESULT getFont(int what, ePtr<gFont> &font) = 0;
        virtual ~eWindowStyle() = 0;
-
 };
 
 class eWindowStyleSimple: public eWindowStyle
 {
-       DECLARE_REF;
+       DECLARE_REF(eWindowStyleSimple);
 private:
        ePtr<gFont> m_fnt;
        gColor m_border_color_tl, m_border_color_br, m_title_color_back, m_title_color, m_background_color;
@@ -45,6 +53,48 @@ public:
        void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
        void setStyle(gPainter &painter, int what);
        void drawFrame(gPainter &painter, const eRect &frame, int what);
+       RESULT getFont(int what, ePtr<gFont> &font);
 };
 
+#if 0
+class eWindowStyleSkinned: public eWindowStyle
+{
+       DECLARE_REF(eWindowStyleSkinned);
+public:
+       eWindowStyleSkinned();
+       void handleNewSize(eWindow *wnd, const eSize &size);
+       void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
+       void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
+       void setStyle(gPainter &painter, int what);
+       void drawFrame(gPainter &painter, const eRect &frame, int what);
+       
+       enum {
+               bsWindow,
+               bsButton,
+#ifndef SWIG
+               bsMax
+#endif
+       };
+       
+       enum {
+               bpTopLeft     =     1,
+               bpTop         =     2,
+               bpTopRight    =     4,
+               bpLeft        =     8,
+               bpRight       =  0x10,
+               bpBottomLeft  =  0x20,
+               bpBottom      =  0x40,
+               bpBottomRight =  0x80,
+               bpBackground  = 0x100
+       };
+private:
+       struct borderSet
+       {
+               ePtr<gPixmap> m_pixmap[9];
+       };
+       
+       void drawBorder(gPainter &painter, const eSize &size, const struct borderSet &border, int where);
+};
+#endif
+
 #endif