diff options
author | rathnor <rathnor> | 2002-12-01 13:42:15 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2002-12-01 13:42:15 (GMT) |
commit | 28b5c604490094e187494dcc566bd3d7a05a2c25 (patch) | |
tree | 8f78f5714a5cd055c10b067a2656fe7b2338e71a /src/FbTk/Font.hh | |
parent | b9134162f9633784d9097df18769a699a62650fe (diff) | |
download | fluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.zip fluxbox-28b5c604490094e187494dcc566bd3d7a05a2c25.tar.bz2 |
Indenting from tabs to emacs 4-space
Diffstat (limited to 'src/FbTk/Font.hh')
-rw-r--r-- | src/FbTk/Font.hh | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/src/FbTk/Font.hh b/src/FbTk/Font.hh index 60281ba..0e88e69 100644 --- a/src/FbTk/Font.hh +++ b/src/FbTk/Font.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: Font.hh,v 1.1 2002/11/26 16:01:27 fluxgen Exp $ | 22 | //$Id: Font.hh,v 1.2 2002/12/01 13:42:14 rathnor Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_FONT_HH | 24 | #ifndef FBTK_FONT_HH |
25 | #define FBTK_FONT_HH | 25 | #define FBTK_FONT_HH |
@@ -35,48 +35,48 @@ namespace FbTk { | |||
35 | class FontImp; | 35 | class FontImp; |
36 | 36 | ||
37 | /** | 37 | /** |
38 | Handles the client to fontimp bridge. | 38 | Handles the client to fontimp bridge. |
39 | */ | 39 | */ |
40 | class Font { | 40 | class Font { |
41 | public: | 41 | public: |
42 | Font(const char *name=0, bool antialias = false); | 42 | Font(const char *name=0, bool antialias = false); |
43 | virtual ~Font(); | 43 | virtual ~Font(); |
44 | /** | 44 | /** |
45 | Load a font | 45 | Load a font |
46 | @return true on success, else false and it'll fall back on the last | 46 | @return true on success, else false and it'll fall back on the last |
47 | loaded font | 47 | loaded font |
48 | */ | 48 | */ |
49 | bool load(const char *name); | 49 | bool load(const char *name); |
50 | 50 | ||
51 | /// @return true if multibyte is enabled, else false | 51 | /// @return true if multibyte is enabled, else false |
52 | static bool multibyte() { return m_multibyte; } | 52 | static bool multibyte() { return m_multibyte; } |
53 | /// @return true if utf-8 mode is enabled, else false | 53 | /// @return true if utf-8 mode is enabled, else false |
54 | static bool utf8() { return m_utf8mode; } | 54 | static bool utf8() { return m_utf8mode; } |
55 | void setAntialias(bool flag); | 55 | void setAntialias(bool flag); |
56 | /** | 56 | /** |
57 | @param text text to check size | 57 | @param text text to check size |
58 | @param size length of text in bytes | 58 | @param size length of text in bytes |
59 | @return size of text in pixels | 59 | @return size of text in pixels |
60 | */ | 60 | */ |
61 | unsigned int textWidth(const char * const text, unsigned int size) const; | 61 | unsigned int textWidth(const char * const text, unsigned int size) const; |
62 | unsigned int height() const; | 62 | unsigned int height() const; |
63 | int ascent() const; | 63 | int ascent() const; |
64 | int descent() const; | 64 | int descent() const; |
65 | /** | 65 | /** |
66 | Rotate font in any angle (currently only 90 degrees supported and just XFont implementation) | 66 | Rotate font in any angle (currently only 90 degrees supported and just XFont implementation) |
67 | */ | 67 | */ |
68 | void rotate(float angle); | 68 | void rotate(float angle); |
69 | void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const; | 69 | void drawText(Drawable w, int screen, GC gc, const char *text, size_t len, int x, int y) const; |
70 | bool isAntialias() const { return m_antialias; } | 70 | bool isAntialias() const { return m_antialias; } |
71 | bool isRotated() const { return m_rotated; } | 71 | bool isRotated() const { return m_rotated; } |
72 | private: | 72 | private: |
73 | 73 | ||
74 | std::auto_ptr<FontImp> m_fontimp; | 74 | std::auto_ptr<FontImp> m_fontimp; |
75 | std::string m_fontstr; | 75 | std::string m_fontstr; |
76 | static bool m_multibyte; | 76 | static bool m_multibyte; |
77 | static bool m_utf8mode; | 77 | static bool m_utf8mode; |
78 | bool m_antialias; | 78 | bool m_antialias; |
79 | bool m_rotated; ///< wheter we're rotated or not | 79 | bool m_rotated; ///< wheter we're rotated or not |
80 | }; | 80 | }; |
81 | 81 | ||
82 | }; //end namespace FbTk | 82 | }; //end namespace FbTk |