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;
24 virtual void drawFrame(gPainter &painter, const eRect &frame, int type) = 0;
30 virtual ~eWindowStyle() = 0;
34 class eWindowStyleSimple: public eWindowStyle
36 DECLARE_REF(eWindowStyleSimple);
39 gColor m_border_color_tl, m_border_color_br, m_title_color_back, m_title_color, m_background_color;
41 int m_border_top, m_border_left, m_border_right, m_border_bottom;
44 void handleNewSize(eWindow *wnd, const eSize &size);
45 void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
46 void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
47 void setStyle(gPainter &painter, int what);
48 void drawFrame(gPainter &painter, const eRect &frame, int what);
51 class eWindowStyleSkinned: public eWindowStyle
53 DECLARE_REF(eWindowStyleSkinned);
55 eWindowStyleSkinned();
56 void handleNewSize(eWindow *wnd, const eSize &size);
57 void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title);
58 void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size);
59 void setStyle(gPainter &painter, int what);
60 void drawFrame(gPainter &painter, const eRect &frame, int what);
84 ePtr<gPixmap> m_pixmap[9];
87 void drawBorder(gPainter &painter, const eSize &size, const struct borderSet &border, int where);