diff options
author | fluxgen <fluxgen> | 2002-10-13 22:22:14 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-10-13 22:22:14 (GMT) |
commit | bc35a88d7801fed57cebe447f21fc0812a6855e0 (patch) | |
tree | 65f64a0834f7de0ffa2f0e657ecddea5b00d0691 /src/FontImp.hh | |
parent | a5aa9fa3f5129848a929346f99f17bc5afa05424 (diff) | |
download | fluxbox_pavel-bc35a88d7801fed57cebe447f21fc0812a6855e0.zip fluxbox_pavel-bc35a88d7801fed57cebe447f21fc0812a6855e0.tar.bz2 |
initial import
Diffstat (limited to 'src/FontImp.hh')
-rw-r--r-- | src/FontImp.hh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/FontImp.hh b/src/FontImp.hh new file mode 100644 index 0000000..59042ad --- /dev/null +++ b/src/FontImp.hh | |||
@@ -0,0 +1,52 @@ | |||
1 | // FontImp.cc for FbTk | ||
2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen@linuxmail.org) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // $Id: FontImp.hh,v 1.1 2002/10/13 22:22:14 fluxgen Exp $ | ||
23 | |||
24 | #ifndef FBTK_FONTIMP_HH | ||
25 | #define FBTK_FONTIMP_HH | ||
26 | |||
27 | #include "Color.hh" | ||
28 | |||
29 | #include <X11/Xlib.h> | ||
30 | |||
31 | #include <string> | ||
32 | |||
33 | namespace FbTk { | ||
34 | |||
35 | /** | ||
36 | FontImp, second part of the bridge pattern for fonts | ||
37 | pure interface class. | ||
38 | */ | ||
39 | class FontImp { | ||
40 | public: | ||
41 | virtual ~FontImp() { } | ||
42 | virtual bool load(const std::string &name) = 0; | ||
43 | virtual void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const = 0; | ||
44 | virtual unsigned int textWidth(const char * const text, unsigned int size) const = 0; | ||
45 | virtual unsigned int height() const = 0; | ||
46 | protected: | ||
47 | FontImp() { } | ||
48 | }; | ||
49 | |||
50 | }; // end namespace FbTk | ||
51 | |||
52 | #endif // FBTK_FONTIMP_HH | ||