fixme: stopService()
[enigma2.git] / lib / gui / elabel.h
1 #ifndef __lib_gui_elabel_h
2 #define __lib_gui_elabel_h
3
4 #include <lib/gui/ewidget.h>
5
6 class eLabel: public eWidget
7 {
8 public:
9         eLabel(eWidget *parent);
10         void setText(const std::string &string);
11         void setFont(gFont *font);
12         gFont* eLabel::getFont();
13
14         enum
15         {
16                 alignLeft,
17                 alignTop=alignLeft,
18                 alignCenter,
19                 alignRight,
20                 alignBottom=alignRight,
21                 alignBlock
22         };
23         
24         void setVAlign(int align);
25         void setHAlign(int align);
26         
27         void setForegroundColor(const gRGB &col);
28         void clearForegroundColor();
29         
30         eSize calculateSize();
31 protected:
32         ePtr<gFont> m_font;
33         int m_valign, m_halign;
34         std::string m_text;
35         int event(int event, void *data=0, void *data2=0);
36 private:
37         int m_have_foreground_color;
38         gRGB m_foreground_color;
39         
40         enum eLabelEvent
41         {
42                 evtChangedText = evtUserWidget,
43                 evtChangedFont,
44                 evtChangedAlignment
45         };
46 };
47
48 #endif