- redraw now in idle
[enigma2.git] / lib / gui / ewindowstyle.h
1 #ifndef __lib_gui_ewindowstyle_h
2 #define __lib_gui_ewindowstyle_h
3
4 class eWindow;
5 class eSize;
6 class gFont;
7
8 #include <lib/base/object.h>
9
10 class eWindowStyle: public iObject
11 {
12 public:
13         virtual void handleNewSize(eWindow *wnd, const eSize &size) = 0;
14         virtual void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) = 0;
15         virtual void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) = 0;
16         virtual void setForegroundStyle(gPainter &painter) = 0;
17         virtual void drawButtonFrame(gPainter &painter, const eRect &frame) = 0;
18         virtual ~eWindowStyle() = 0;
19 };
20
21 class eWindowStyleSimple: public eWindowStyle
22 {
23         DECLARE_REF;
24 private:
25         ePtr<gFont> m_fnt;
26         gColor m_border_color_tl, m_border_color_br, m_title_color_back, m_title_color, m_background_color;
27         
28         int m_border_top, m_border_left, m_border_right, m_border_bottom;
29 public:
30         eWindowStyleSimple();
31         void handleNewSize(eWindow *wnd, const eSize &size);
32         void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
33         void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
34         void setForegroundStyle(gPainter &painter);
35         void drawButtonFrame(gPainter &painter, const eRect &frame);
36 };
37
38 #endif