Irrlicht 3D Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IGUIFont.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_GUI_FONT_H_INCLUDED__
6 #define __I_GUI_FONT_H_INCLUDED__
7 
8 #include "IReferenceCounted.h"
9 #include "SColor.h"
10 #include "rect.h"
11 #include "irrString.h"
12 
13 namespace irr
14 {
15 namespace gui
16 {
17 
20 {
23 
25 
29 
31 
33 
36 };
37 
39 class IGUIFont : public virtual IReferenceCounted
40 {
41 public:
42 
44 
51  virtual void draw(const core::stringw& text, const core::rect<s32>& position,
52  video::SColor color, bool hcenter=false, bool vcenter=false,
53  const core::rect<s32>* clip=0) = 0;
54 
56 
58  virtual core::dimension2d<u32> getDimension(const wchar_t* text) const = 0;
59 
61 
65  virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0;
66 
68  virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; }
69 
71  virtual void setKerningWidth (s32 kerning) = 0;
72 
74  virtual void setKerningHeight (s32 kerning) = 0;
75 
77 
87  virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0;
88 
90  virtual s32 getKerningHeight() const = 0;
91 
93 
97  virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
98 };
99 
100 } // end namespace gui
101 } // end namespace irr
102 
103 #endif
104