openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
ewindowstyleskinned.h
Go to the documentation of this file.
1 #ifndef __lib_gui_ewindowstyleskinned_h
2 #define __lib_gui_ewindowstyleskinned_h
3 
4 #include <lib/gui/ewindowstyle.h>
5 
7 {
8  DECLARE_REF(eWindowStyleSkinned);
9 public:
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 {
24 #ifndef SWIG
25  bsMax
26 #endif
27  };
28 
29  enum {
30  bpTopLeft = 1,
31  bpTop = 2,
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 {
45  bpiTop = 1,
47  bpiLeft = 3,
49  bpiRight = 5,
51  bpiBottom = 7,
53  };
54 
55  void setPixmap(int bs, int bp, ePtr<gPixmap> &pixmap);
56  void setPixmap(int bs, int bp, gPixmap &pixmap);
57 
58  enum {
69 
72 
76 
80 
81  colMax
82  };
83 
84  void setColor(int what, const gRGB &back);
85 
86  void setTitleOffset(const eSize &offset);
87  void setTitleFont(gFont *fnt);
88  void setLabelFont(gFont *fnt);
89  void setListboxFont(gFont *fnt);
90  void setEntryFont(gFont *fnt);
91  void setValueFont(gFont *fnt);
92 
93 private:
94  struct borderSet
95  {
96  ePtr<gPixmap> m_pixmap[9];
97  int m_border_top, m_border_left, m_border_right, m_border_bottom;
98  borderSet() { m_border_top = m_border_left = m_border_right = m_border_bottom = 0; }
99  };
100 
101  borderSet m_border[bsMax];
102 
103  gRGB m_color[colMax];
104 
105  eSize m_title_offset;
106  ePtr<gFont> m_fnt, m_labelfnt, m_listboxfnt, m_entryfnt, m_valuefnt;
107 
108  void drawBorder(gPainter &painter, const eRect &size, struct borderSet &border, int where);
109 };
110 
111 #endif
Definition: epoint.h:9
Definition: erect.h:11
Definition: esize.h:8
Definition: ewindow.h:10
Definition: ewindowstyle.h:46
Definition: ewindowstyleskinned.h:7
RESULT getFont(int what, ePtr< gFont > &font)
Definition: ewindowstyleskinned.cpp:231
void setTitleFont(gFont *fnt)
Definition: ewindowstyleskinned.cpp:319
void setValueFont(gFont *fnt)
Definition: ewindowstyleskinned.cpp:339
@ bpTopRight
Definition: ewindowstyleskinned.h:32
@ bpBottomRight
Definition: ewindowstyleskinned.h:38
@ bpTopLeft
Definition: ewindowstyleskinned.h:30
@ bpMax
Definition: ewindowstyleskinned.h:40
@ bpLeft
Definition: ewindowstyleskinned.h:33
@ bpTop
Definition: ewindowstyleskinned.h:31
@ bpAll
Definition: ewindowstyleskinned.h:39
@ bpBottom
Definition: ewindowstyleskinned.h:37
@ bpRight
Definition: ewindowstyleskinned.h:35
@ bpBottomLeft
Definition: ewindowstyleskinned.h:36
@ bpBackground
Definition: ewindowstyleskinned.h:34
void setListboxFont(gFont *fnt)
Definition: ewindowstyleskinned.cpp:329
void paintBackground(gPainter &painter, const ePoint &offset, const eSize &size)
Definition: ewindowstyleskinned.cpp:59
@ bpiRight
Definition: ewindowstyleskinned.h:49
@ bpiTopLeft
Definition: ewindowstyleskinned.h:44
@ bpiLeft
Definition: ewindowstyleskinned.h:47
@ bpiBackground
Definition: ewindowstyleskinned.h:48
@ bpiBottomRight
Definition: ewindowstyleskinned.h:52
@ bpiBottom
Definition: ewindowstyleskinned.h:51
@ bpiBottomLeft
Definition: ewindowstyleskinned.h:50
@ bpiTopRight
Definition: ewindowstyleskinned.h:46
@ bpiTop
Definition: ewindowstyleskinned.h:45
void setEntryFont(gFont *fnt)
Definition: ewindowstyleskinned.cpp:334
void setStyle(gPainter &painter, int what)
Definition: ewindowstyleskinned.cpp:65
void handleNewSize(eWindow *wnd, eSize &size, eSize &offset)
Definition: ewindowstyleskinned.cpp:27
void setLabelFont(gFont *fnt)
Definition: ewindowstyleskinned.cpp:324
void paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title)
Definition: ewindowstyleskinned.cpp:46
@ colScrollbarBorder
Definition: ewindowstyleskinned.h:75
@ colListboxBackground
Definition: ewindowstyleskinned.h:61
@ colSliderForeground
Definition: ewindowstyleskinned.h:77
@ colListboxBackgroundMarked
Definition: ewindowstyleskinned.h:65
@ colWindowTitleBackground
Definition: ewindowstyleskinned.h:71
@ colScrollbarForeground
Definition: ewindowstyleskinned.h:73
@ colScrollbarBackground
Definition: ewindowstyleskinned.h:74
@ colListboxForegroundMarkedSelected
Definition: ewindowstyleskinned.h:68
@ colListboxForegroundSelected
Definition: ewindowstyleskinned.h:64
@ colMax
Definition: ewindowstyleskinned.h:81
@ colSliderBorder
Definition: ewindowstyleskinned.h:79
@ colSliderBackground
Definition: ewindowstyleskinned.h:78
@ colBackground
Definition: ewindowstyleskinned.h:59
@ colListboxForeground
Definition: ewindowstyleskinned.h:62
@ colListboxBackgroundMarkedSelected
Definition: ewindowstyleskinned.h:67
@ colListboxForegroundMarked
Definition: ewindowstyleskinned.h:66
@ colWindowTitleForeground
Definition: ewindowstyleskinned.h:70
@ colListboxBackgroundSelected
Definition: ewindowstyleskinned.h:63
@ colForeground
Definition: ewindowstyleskinned.h:60
@ bsWindow
Definition: ewindowstyleskinned.h:21
@ bsMax
Definition: ewindowstyleskinned.h:25
@ bsListboxEntry
Definition: ewindowstyleskinned.h:23
@ bsButton
Definition: ewindowstyleskinned.h:22
void drawFrame(gPainter &painter, const eRect &frame, int what)
Definition: ewindowstyleskinned.cpp:114
void setTitleOffset(const eSize &offset)
Definition: ewindowstyleskinned.cpp:314
void setColor(int what, const gRGB &back)
Definition: ewindowstyleskinned.cpp:308
eWindowStyleSkinned()
Definition: ewindowstyleskinned.cpp:9
void setPixmap(int bs, int bp, ePtr< gPixmap > &pixmap)
Definition: ewindowstyleskinned.cpp:260
A softreference to a font.
Definition: gfont.h:14
Definition: grc.h:239
Definition: gpixmap.h:188
fontRenderClass * font
size
Definition: Plugins/SystemPlugins/PositionerSetup/log.py:16
list where
Definition: newplugin.py:126
int RESULT
Definition: object.h:12
Definition: gpixmap.h:14