aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/FontImp.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-11-26 16:01:28 (GMT)
committerfluxgen <fluxgen>2002-11-26 16:01:28 (GMT)
commitac4420cdc50b7d7410781bc1bbbd1e89e18f256d (patch)
tree5c18c5497d42fafdd962269aa42f2efe80a2afdf /src/FbTk/FontImp.hh
parent031edc36acb3957046d0836ec0ac17cd1c323b22 (diff)
downloadfluxbox_pavel-ac4420cdc50b7d7410781bc1bbbd1e89e18f256d.zip
fluxbox_pavel-ac4420cdc50b7d7410781bc1bbbd1e89e18f256d.tar.bz2
initial import
Diffstat (limited to 'src/FbTk/FontImp.hh')
-rw-r--r--src/FbTk/FontImp.hh57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/FbTk/FontImp.hh b/src/FbTk/FontImp.hh
new file mode 100644
index 0000000..5414daf
--- /dev/null
+++ b/src/FbTk/FontImp.hh
@@ -0,0 +1,57 @@
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/11/26 16:01:27 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
33namespace FbTk {
34
35/**
36 FontImp, second part of the bridge pattern for fonts
37 pure interface class.
38 @see Font
39*/
40class FontImp {
41public:
42 virtual ~FontImp() { }
43 virtual bool load(const std::string &name) = 0;
44 virtual void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const = 0;
45 virtual unsigned int textWidth(const char * const text, unsigned int size) const = 0;
46 virtual int ascent() const = 0;
47 virtual int descent() const = 0;
48 virtual unsigned int height() const = 0;
49 virtual bool loaded() const = 0;
50 virtual void rotate(float angle) { } // by default, no rotate support
51protected:
52 FontImp() { }
53};
54
55}; // end namespace FbTk
56
57#endif // FBTK_FONTIMP_HH