- sdl is now default output
[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         void handleNewSize(eWindow *wnd, eSize &size, eSize &offset);
12         void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
13         void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
14         void setStyle(gPainter &painter, int what);
15         void drawFrame(gPainter &painter, const eRect &frame, int what);
16         RESULT getFont(int what, ePtr<gFont> &font);
17         
18         enum {
19                 bsWindow,
20                 bsButton,
21                 bsListboxEntry,
22 #ifndef SWIG
23                 bsMax
24 #endif
25         };
26         
27         enum {
28                 bpTopLeft     =     1,
29                 bpTop         =     2,
30                 bpTopRight    =     4,
31                 bpLeft        =     8,
32                 bpBackground  =  0x10,
33                 bpRight       =  0x20,
34                 bpBottomLeft  =  0x40,
35                 bpBottom      =  0x80,
36                 bpBottomRight = 0x100,
37                 bpAll         = 0x1ff,
38                 bpMax         = 0x200
39         };
40         
41         enum {
42                 bpiTopLeft     =  0,
43                 bpiTop         =  1,
44                 bpiTopRight    =  2,
45                 bpiLeft        =  3,
46                 bpiBackground  =  4,
47                 bpiRight       =  5,
48                 bpiBottomLeft  =  6,
49                 bpiBottom      =  7,
50                 bpiBottomRight =  8,
51         };
52         
53         void setPixmap(int bs, int bp, gPixmap &pixmap);
54         
55         void setDefaultBackgroundColor(const gRGB &back);
56         
57 private:
58         struct borderSet
59         {
60                 ePtr<gPixmap> m_pixmap[9];
61                 int m_border_top, m_border_left, m_border_right, m_border_bottom;
62         };
63         
64         borderSet m_border[bsMax];
65         
66         gRGB m_background_color;
67         
68         void drawBorder(gPainter &painter, const eRect &size, struct borderSet &border, int where);
69 };
70
71 #endif