trunk 20080912
[gitenigma.git] / include / lib / gui / elabel.h
blob88a9e9323972151c1aaa2fb174c832e1ba2279d4
1 #ifndef __elabel_h
2 #define __elabel_h
4 #include <lib/gui/ewidget.h>
5 #include <lib/gdi/grc.h>
7 // Definition Blit Flags
8 #define BF_ALPHATEST 1
10 class eLabel: public eDecoWidget
12 protected:
13 int blitFlags;
14 int flags;
15 eTextPara *para;
16 gColor transparentBackgroundColor;
17 int align;
18 void validate( const eSize* s=0 );
19 int eventHandler(const eWidgetEvent &event);
20 void redrawWidget(gPainter *target, const eRect &area);
21 int yOffs;
22 gPixmap *shortcutPixmap; // shortcut pixmap to be displayed right after description
23 public:
24 void invalidate();
25 enum { flagVCenter = 64 };
26 eLabel(eWidget *parent, int flags=0 /* RS_WRAP */ , int takefocus=0, const char* deco="eLabel" );
27 ~eLabel();
29 void setBlitFlags( int flags );
30 void setFlags(int flags);
31 void removeFlags(int flags);
32 void setAlign(int align);
33 void setShortcutPixmap(const eString &shortcut);
34 int setProperty(const eString &prop, const eString &value);
35 void setPixmapPosition( const ePoint &p );
37 eSize getExtend();
38 ePoint getLeftTop();
39 const eTextPara* getPara() const { return para; }
41 ePoint pixmap_position, text_position;
44 #endif