summaryrefslogtreecommitdiffstats
path: root/src/xosd.h
blob: 26a6119a8c060533917b8b6dbdfa772cda4b85dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef XOSD_H_
#define XOSD_H_

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <ntqstring.h>
#include <ntqwidget.h>
#include <ntqfont.h>
#include <ntqpixmap.h>
#include <ntqbitmap.h>

#include <netwm.h>
#include <kwin.h>

class xosd : public TQWidget
{
Q_OBJECT
   public:
      xosd(TQWidget* parent=0, const char *name=0);

      virtual ~xosd();
      void setText(const TQString& t);
      void setFont(const TQString& font);
      void setItalic();
      void setBold();
      void setSize(int size);
      void setColor(const TQString& color);
      void setShadowColor(const TQString& color);
      void setShadowOffset(int off);
      void move2(int x, int y);
      void setOrientation(int orientation, int w, int mh);
      void setClear(int nClean);
      int yOffset;
      int w, h;
      int fontSize;
      int fontStyle;
      TQString fontFamily;

   private:
      NETWinInfo *info;
      TQString text;
      TQFont f;
      TQString fontColor;
      TQString shadowColor;
      int shadowOffset;
      int fOrientation;
      TQPixmap bgBuffer;
      int dw, rdh;
      int lastX, lastY;
      int fCleaner;
      TQPixmap maskBuffer;

   protected:
      void paintEvent(TQPaintEvent *);
};
#endif // XOSD_H_