rewind into timeshift (almost) works now
[enigma2.git] / lib / gui / ewindowstyleskinned.h
1 #ifndef __lib_gui_ewindowstyleskinned_h
2 #define __lib_gui_ewindowstyleskinned_h
3
4 #include <lib/gui/ewindowstyle.h>
5
6 class eWindowStyleSkinned: public eWindowStyle
7 {
8         DECLARE_REF(eWindowStyleSkinned);
9 public:
10         eWindowStyleSkinned();
11 #ifndef SWIG
12         void handleNewSize(eWindow *wnd, eSize &size, eSize &offset);
13         void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
14         void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
15         void drawFrame(gPainter &painter, const eRect &frame, int what);
16         RESULT getFont(int what, ePtr<gFont> &font);
17 #endif
18         void setStyle(gPainter &painter, int what);
19         
20         enum {
21                 bsWindow,
22                 bsButton,
23                 bsListboxEntry,
24 #ifndef SWIG
25                 bsMax
26 #endif
27         };
28         
29         enum {
30                 bpTopLeft     =     1,
31                 bpTop         =     2,
32                 bpTopRight    =     4,
33                 bpLeft        =     8,
34                 bpBackground  =  0x10,
35                 bpRight       =  0x20,
36                 bpBottomLeft  =  0x40,
37                 bpBottom      =  0x80,
38                 bpBottomRight = 0x100,
39                 bpAll         = 0x1ff,
40                 bpMax         = 0x200
41         };
42         
43         enum {
44                 bpiTopLeft     =  0,
45                 bpiTop         =  1,
46                 bpiTopRight    =  2,
47                 bpiLeft        =  3,
48                 bpiBackground  =  4,
49                 bpiRight       =  5,
50                 bpiBottomLeft  =  6,
51                 bpiBottom      =  7,
52                 bpiBottomRight =  8,
53         };
54         
55         void setPixmap(int bs, int bp, ePtr<gPixmap> &pixmap);
56         void setPixmap(int bs, int bp, gPixmap &pixmap);
57         
58         enum {
59                 colBackground,
60                 colLabelForeground,
61                 colListboxBackground,
62                 colListboxForeground,
63                 colListboxSelectedBackground,
64                 colListboxSelectedForeground,
65                 colListboxMarkedBackground,
66                 colListboxMarkedForeground,
67                 colListboxMarkedAndSelectedBackground,
68                 colListboxMarkedAndSelectedForeground,
69                 
70                 colWindowTitleForeground,
71                 colWindowTitleBackground,
72                 colMax
73         };
74         
75         void setColor(int what, const gRGB &back);
76         
77         void setTitleOffset(const eSize &offset);
78         void setTitleFont(gFont *fnt);
79         
80 private:
81         struct borderSet
82         {
83                 ePtr<gPixmap> m_pixmap[9];
84                 int m_border_top, m_border_left, m_border_right, m_border_bottom;
85         };
86         
87         borderSet m_border[bsMax];
88         
89         gRGB m_color[colMax];
90         
91         eSize m_title_offset;
92         ePtr<gFont> m_fnt;
93         
94         void drawBorder(gPainter &painter, const eRect &size, struct borderSet &border, int where);
95 };
96
97 #endif