aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XFontImp.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2002-12-01 13:42:15 (GMT)
committerrathnor <rathnor>2002-12-01 13:42:15 (GMT)
commit28b5c604490094e187494dcc566bd3d7a05a2c25 (patch)
tree8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/FbTk/XFontImp.hh
parentb9134162f9633784d9097df18769a699a62650fe (diff)
downloadfluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.zip
fluxbox_pavel-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/FbTk/XFontImp.hh')
-rw-r--r--src/FbTk/XFontImp.hh80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/FbTk/XFontImp.hh b/src/FbTk/XFontImp.hh
index 1ecc8cd..f313d69 100644
--- a/src/FbTk/XFontImp.hh
+++ b/src/FbTk/XFontImp.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: XFontImp.hh,v 1.1 2002/11/26 16:01:27 fluxgen Exp $ 22// $Id: XFontImp.hh,v 1.2 2002/12/01 13:42:15 rathnor Exp $
23 23
24#ifndef FBTK_XFONTIMP_HH 24#ifndef FBTK_XFONTIMP_HH
25#define FBTK_XFONTIMP_HH 25#define FBTK_XFONTIMP_HH
@@ -29,51 +29,51 @@ namespace FbTk {
29 29
30class XFontImp:public FbTk::FontImp { 30class XFontImp:public FbTk::FontImp {
31public: 31public:
32 explicit XFontImp(const char *filename = 0); 32 explicit XFontImp(const char *filename = 0);
33 ~XFontImp(); 33 ~XFontImp();
34 bool load(const std::string &filename); 34 bool load(const std::string &filename);
35 unsigned int textWidth(const char * const text, unsigned int size) const; 35 unsigned int textWidth(const char * const text, unsigned int size) const;
36 unsigned int height() const; 36 unsigned int height() const;
37 float angle() const { return m_angle; } 37 float angle() const { return m_angle; }
38 int ascent() const; 38 int ascent() const;
39 int descent() const { return m_fontstruct ? m_fontstruct->descent : 0; } 39 int descent() const { return m_fontstruct ? m_fontstruct->descent : 0; }
40 void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const; 40 void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
41 bool loaded() const { return m_fontstruct != 0; } 41 bool loaded() const { return m_fontstruct != 0; }
42 void rotate(float angle); 42 void rotate(float angle);
43private: 43private:
44 void freeRotFont(); 44 void freeRotFont();
45 void drawRotText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const; 45 void drawRotText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const;
46 unsigned int rotTextWidth(const char * const text, unsigned int size) const; 46 unsigned int rotTextWidth(const char * const text, unsigned int size) const;
47 struct BitmapStruct { 47 struct BitmapStruct {
48 int bit_w; 48 int bit_w;
49 int bit_h; 49 int bit_h;
50 50
51 Pixmap bm; 51 Pixmap bm;
52 }; 52 };
53 53
54 struct XRotCharStruct { 54 struct XRotCharStruct {
55 int ascent; 55 int ascent;
56 int descent; 56 int descent;
57 int lbearing; 57 int lbearing;
58 int rbearing; 58 int rbearing;
59 int width; 59 int width;
60 60
61 BitmapStruct glyph; 61 BitmapStruct glyph;
62 }; 62 };
63 63
64 struct XRotFontStruct { 64 struct XRotFontStruct {
65 int dir; 65 int dir;
66 int height; 66 int height;
67 int max_ascent; 67 int max_ascent;
68 int max_descent; 68 int max_descent;
69 int max_char; 69 int max_char;
70 int min_char; 70 int min_char;
71 71
72 XRotCharStruct per_char[95]; 72 XRotCharStruct per_char[95];
73 }; 73 };
74 XRotFontStruct *m_rotfont; 74 XRotFontStruct *m_rotfont;
75 XFontStruct *m_fontstruct; 75 XFontStruct *m_fontstruct;
76 float m_angle; 76 float m_angle;
77}; 77};
78 78
79}; // end namespace FbTk 79}; // end namespace FbTk