some python import cleanups
[vuplus_dvbapp] / 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, gPixmap &pixmap);
56         
57         enum {
58                 colBackground,
59                 colLabelForeground,
60                 colListboxBackground,
61                 colListboxForeground,
62                 colListboxSelectedBackground,
63                 colListboxSelectedForeground,
64                 colListboxMarkedBackground,
65                 colListboxMarkedForeground,
66                 colListboxMarkedAndSelectedBackground,
67                 colListboxMarkedAndSelectedForeground,
68                 
69                 colWindowTitleForeground,
70                 colWindowTitleBackground,
71                 colMax
72         };
73         
74         void setColor(int what, const gRGB &back);
75         
76         void setTitleOffset(const eSize &offset);
77         void setTitleFont(gFont *fnt);
78         
79 private:
80         struct borderSet
81         {
82                 ePtr<gPixmap> m_pixmap[9];
83                 int m_border_top, m_border_left, m_border_right, m_border_bottom;
84         };
85         
86         borderSet m_border[bsMax];
87         
88         gRGB m_color[colMax];
89         
90         eSize m_title_offset;
91         ePtr<gFont> m_fnt;
92         
93         void drawBorder(gPainter &painter, const eRect &size, struct borderSet &border, int where);
94 };
95
96 #endif