src/xfont.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: xfont.h 7 2007-05-24 11:03:53Z eg1981 $
00005 
00006 #ifndef __XFONT_H
00007 #define __XFONT_H
00008 
00009 #include "ncwm.h"
00010 
00011 extern "C" {
00012 #include <X11/Xlib.h>
00013 }
00014 
00015 #include <string>
00016 
00017 #include "font.h"
00018 
00019 class Monitor;
00020 
00022 class XFont : public WFont {
00023 
00024 public:
00025 
00026     XFont(Monitor *monitor, XFontStruct *font);
00027     virtual ~XFont();
00028 
00029     virtual void drawText(Window window, GC gc, int x, int y, string text);
00030 
00031     virtual int textWidth(string text);
00032 
00033     virtual unsigned int height();
00034 
00035     virtual void setHeight(unsigned int height);
00036 
00037     XFontStruct *font() const;
00038 
00039     virtual int ascent();
00040 
00041     virtual int descent();
00042 
00043     static XFont *load(Monitor *monitor, string name);
00044 
00045 private:
00046 
00047     XFontStruct *font_;
00048     unsigned int height_;
00049 
00050 };
00051 
00052 #endif // __XFONT_H

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