src/xftfont.h

Go to the documentation of this file.
00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de>
00002 // See ../LICENSE.txt for license details.
00003 //
00004 // $Id: xftfont.h 7 2007-05-24 11:03:53Z eg1981 $
00005 
00006 #ifndef __XFTFONT_H
00007 #define __XFTFONT_H
00008 
00009 #include "ncwm.h"
00010 
00011 #ifdef XFT_SUPPORT
00012 
00013 extern "C" {
00014 #include <X11/Xft/Xft.h>
00015 }
00016 
00017 #include <string>
00018 
00019 #include "font.h"
00020 
00021 class Monitor;
00022 
00024 class WXftFont : public WFont {
00025 
00026 public:
00027 
00028     WXftFont(Monitor *monitor, XftFont *font);
00029     virtual ~WXftFont();
00030 
00031     virtual void drawText(Window window, GC gc, int x, int y, string text);
00032 
00033     virtual int textWidth(string text);
00034 
00035     virtual unsigned int height();
00036 
00037     virtual void setHeight(unsigned int height);
00038 
00039     virtual int ascent();
00040 
00041     virtual int descent();
00042 
00043     static WXftFont *load(Monitor *monitor, string name);
00044 
00045 private:
00046 
00047     XftFont *font_;
00048     unsigned int height_;
00049 
00050 };
00051 
00052 #endif // XFT_SUPPORT
00053 
00054 #endif // __XFTFONT_H

Generated on Thu May 24 15:19:32 2007 for ncwm by  doxygen 1.5.1