1 #ifndef __lib_gui_ewindowstyle_h
2 #define __lib_gui_ewindowstyle_h
8 #include <lib/base/object.h>
10 class eWindowStyle: public iObject
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 setStyle(gPainter &painter, int what) = 0;
23 virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
29 virtual ~eWindowStyle() = 0;
33 class eWindowStyleSimple: public eWindowStyle
35 DECLARE_REF(eWindowStyleSimple);
38 gColor m_border_color_tl, m_border_color_br, m_title_color_back, m_title_color, m_background_color;
40 int m_border_top, m_border_left, m_border_right, m_border_bottom;
43 void handleNewSize(eWindow *wnd, const eSize &size);
44 void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
45 void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
46 void setStyle(gPainter &painter, int what);
47 void drawFrame(gPainter &painter, const eRect &frame, int what);
50 class eWindowStyleSkinned: public eWindowStyle
52 DECLARE_REF(eWindowStyleSkinned);
54 eWindowStyleSkinned();
55 void handleNewSize(eWindow *wnd, const eSize &size);
56 void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
57 void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
58 void setStyle(gPainter &painter, int what);
59 void drawFrame(gPainter &painter, const eRect &frame, int what);
83 ePtr<gPixmap> m_pixmap[9];
86 void drawBorder(gPainter &painter, const eSize &size, const struct borderSet &border, int where);