]> Dogcows Code - chaz/openbox/blobdiff - otk/font.hh
use otk objects in the ob scripts by importing otk
[chaz/openbox] / otk / font.hh
index 2ffa39a51b2ecd40b483cb68f7d6b935aeb8ce60..16c47f27aed9f2c5c2c28e4cdcc03561ba264209 100644 (file)
@@ -2,6 +2,9 @@
 #ifndef   __font_hh
 #define   __font_hh
 
+#include "ustring.hh"
+#include "truerendercontrol.hh"
+
 extern "C" {
 #include <X11/Xlib.h>
 #define _XFT_NO_COMPAT_ // no Xft 1 API
@@ -9,11 +12,11 @@ extern "C" {
 }
 
 #include <assert.h>
-#include <string>
 
 namespace otk {
 
 class Color;
+class Surface;
 
 class Font {
   /*
@@ -54,19 +57,14 @@ public:
 
   inline const std::string &fontstring() const { return _fontstring; }
 
-  unsigned int height() const;
-  unsigned int maxCharWidth() const;
+  int height() const;
+  int maxCharWidth() const;
 
-  unsigned int measureString(const std::string &string,
-                             bool utf8 = true) const;
+  int measureString(const ustring &string) const;
 
-  //! Draws a string into an XftDraw object
-  /*!
-    Be Warned: If you use an XftDraw object and a color, or a font from
-    different screens, you WILL have unpredictable results! :)
-  */
-  void drawString(XftDraw *d, int x, int y, const Color &color,
-                  const std::string &string, bool utf8 = true) const;
+  // The RenderControl classes use the internal data to render the fonts, but
+  // noone else needs it, so its private.
+  friend class RenderControl;
 };
 
 }
This page took 0.02359 seconds and 4 git commands to generate.