X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fgui%2Felabel.h;h=84995eccd056c8e2b5995a27bc661f35efa28d1c;hp=7e07f4389fe114ba58ad1b65a604fc3e56e9ede4;hb=0ba26361a853f91ebc36c9c11f6771df74008535;hpb=ab5aa90e1e05a89845c6e802ef1b2366d203aa45 diff --git a/lib/gui/elabel.h b/lib/gui/elabel.h index 7e07f43..84995ec 100644 --- a/lib/gui/elabel.h +++ b/lib/gui/elabel.h @@ -6,10 +6,12 @@ class eLabel: public eWidget { public: - eLabel(eWidget *parent); + eLabel(eWidget *parent, int markedPos = -1); void setText(const std::string &string); + void setMarkedPos(int markedPos); void setFont(gFont *font); - + gFont* getFont(); + enum { alignLeft, @@ -22,18 +24,33 @@ public: void setVAlign(int align); void setHAlign(int align); + + void setForegroundColor(const gRGB &col); + void setShadowColor(const gRGB &col); + void setShadowOffset(const ePoint &offset); + void setNoWrap(int nowrap); + void clearForegroundColor(); + + eSize calculateSize(); protected: ePtr m_font; int m_valign, m_halign; + std::string m_text; int event(int event, void *data=0, void *data2=0); + int m_pos; private: + int m_have_foreground_color, m_have_shadow_color; + gRGB m_foreground_color, m_shadow_color; + ePoint m_shadow_offset; + int m_nowrap; + enum eLabelEvent { evtChangedText = evtUserWidget, evtChangedFont, - evtChangedAlignment + evtChangedAlignment, + evtChangedMarkedPos }; - std::string m_text; }; #endif