Loading...
Searching...
No Matches
IGUIFont.h
Go to the documentation of this file.
// Copyright (C) 2002-2012 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_GUI_FONT_H_INCLUDED__
#define __I_GUI_FONT_H_INCLUDED__
#include "IReferenceCounted.h"
#include "SColor.h"
#include "rect.h"
#include "irrString.h"
namespace irr
{
namespace gui
{
enum EGUI_FONT_TYPE
{
EGFT_BITMAP = 0,
EGFT_VECTOR,
EGFT_OS,
EGFT_CUSTOM
};
class IGUIFont : public virtual IReferenceCounted
{
public:
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
video::SColor color, bool hcenter=false, bool vcenter=false,
const core::rect<s32>* clip=0) = 0;
virtual core::dimension2d<u32> getDimension(const wchar_t* text) const = 0;
virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0;
virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; }
virtual void setKerningWidth (s32 kerning) = 0;
virtual void setKerningHeight (s32 kerning) = 0;
virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0;
virtual s32 getKerningHeight() const = 0;
virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
};
} // end namespace gui
} // end namespace irr
#endif
IReferenceCounted.h
SColor.h
irr::IReferenceCounted::IReferenceCounted
IReferenceCounted()
Constructor.
Definition IReferenceCounted.h:46
irr::core::dimension2d
Specifies a 2 dimensional size.
Definition dimension2d.h:21
irr::core::rect
Rectangle template.
Definition rect.h:27
irr::gui::IGUIFont
Font interface.
Definition IGUIFont.h:40
irr::gui::IGUIFont::getKerningHeight
virtual s32 getKerningHeight() const =0
Returns the distance between letters.
irr::gui::IGUIFont::getDimension
virtual core::dimension2d< u32 > getDimension(const wchar_t *text) const =0
Calculates the width and height of a given string of text.
irr::gui::IGUIFont::getType
virtual EGUI_FONT_TYPE getType() const
Returns the type of this font.
Definition IGUIFont.h:68
irr::gui::IGUIFont::getCharacterFromPos
virtual s32 getCharacterFromPos(const wchar_t *text, s32 pixel_x) const =0
Calculates the index of the character in the text which is on a specific position.
irr::gui::IGUIFont::getKerningWidth
virtual s32 getKerningWidth(const wchar_t *thisLetter=0, const wchar_t *previousLetter=0) const =0
Gets kerning values (distance between letters) for the font. If no parameters are provided,...
irr::gui::IGUIFont::setKerningHeight
virtual void setKerningHeight(s32 kerning)=0
Sets global kerning height for the font.
irr::gui::IGUIFont::setKerningWidth
virtual void setKerningWidth(s32 kerning)=0
Sets global kerning width for the font.
irr::gui::IGUIFont::setInvisibleCharacters
virtual void setInvisibleCharacters(const wchar_t *s)=0
Define which characters should not be drawn by the font.
irr::gui::IGUIFont::draw
virtual void draw(const core::stringw &text, const core::rect< s32 > &position, video::SColor color, bool hcenter=false, bool vcenter=false, const core::rect< s32 > *clip=0)=0
Draws some text and clips it to the specified rectangle if wanted.
irr::video::SColor
Class representing a 32 bit ARGB color.
Definition SColor.h:202
irrString.h
irr::core::stringw
string< wchar_t > stringw
Typedef for wide character strings.
Definition irrString.h:1361
irr::gui
The gui namespace contains useful classes for easy creation of a graphical user interface.
Definition EGUIAlignment.h:11
irr::gui::EGUI_FONT_TYPE
EGUI_FONT_TYPE
An enum for the different types of GUI font.
Definition IGUIFont.h:20
irr::gui::EGFT_VECTOR
@ EGFT_VECTOR
Scalable vector fonts loaded from an XML file.
Definition IGUIFont.h:28
irr::gui::EGFT_CUSTOM
@ EGFT_CUSTOM
An external font type provided by the user.
Definition IGUIFont.h:35
irr::gui::EGFT_OS
@ EGFT_OS
A font which uses a the native API provided by the operating system.
Definition IGUIFont.h:32
irr::gui::EGFT_BITMAP
@ EGFT_BITMAP
Bitmap fonts loaded from an XML file or a texture.
Definition IGUIFont.h:22
irr
Everything in the Irrlicht Engine can be found in this namespace.
Definition aabbox3d.h:13
irr::s32
signed int s32
32 bit signed variable.
Definition irrTypes.h:66
rect.h
- Irrlicht Engine Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on for Irrlicht 3D Engine by Doxygen 1.15.0