14 #ifndef _PieDock_Text_
15 #define _PieDock_Text_
20 #include <X11/Xft/Xft.h>
46 Color(
int r,
int g,
int b,
int a = 0xff ) :
51 Color(
const char * );
53 inline const int &getAlpha()
const {
return alpha; }
54 inline const int &getRed()
const {
return red; }
55 inline const int &getGreen()
const {
return green; }
56 inline const int &getBlue()
const {
return blue; }
57 inline const unsigned int getColor()
const {
return
77 Font(
const std::string f,
const double s,
const Color c ) :
82 inline const std::string &getFamily()
const {
84 inline void setFamily(
const std::string &s ) {
86 inline const double &getSize()
const {
return size; }
87 inline void setSize(
const double s ) { size = s; }
88 inline const Color &getColor()
const {
return color; }
89 inline void setColor(
const Color c ) { color = c; }
98 color =
Color( 0xff, 0xff, 0xff, 0xff );
113 Metrics() : x( 0 ), y( 0 ), width( 0 ), height( 0 ) {}
114 Metrics(
int xx,
int yy,
int w,
int h ) :
120 inline const int &getX()
const {
return x; }
121 inline void setX(
int xx ) { x = xx; }
122 inline const int &getY()
const {
return y; }
123 inline void setY(
int yy ) { y = yy; }
124 inline const int &getWidth()
const {
return width; }
125 inline void setWidth(
int w ) { width = w; }
126 inline const int &getHeight()
const {
return height; }
127 inline void setHeight(
int h ) { height = h; }
136 Text( Display *, Drawable, Visual *,
Font );
138 virtual void setColor(
const Color );
139 virtual void draw(
const int,
const int,
const std::string )
const;
140 virtual Metrics
getMetrics(
const std::string )
const;
150 XFontStruct *fontInfo;
156 void translateColor(
const Color &, XftColor * );
158 void translateColor(
const Color &, XColor * );