Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials

# IGUIFont.h

Go to the documentation of this file.

    00001 // Copyright (C) 2002-2009 Nikolaus Gebhardt
    00002 // This file is part of the "Irrlicht Engine".
    00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
    00004
    00005 #ifndef __I_GUI_FONT_H_INCLUDED__
    00006 #define __I_GUI_FONT_H_INCLUDED__
    00007
    00008 #include "IReferenceCounted.h"
    00009 #include "SColor.h"
    00010 #include "rect.h"
    00011 #include "irrString.h"
    00012
    00013 namespace irr
    00014 {
    00015 namespace gui
    00016 {
    00017
    00019 enum EGUI_FONT_TYPE
    00020 {
    00022         EGFT_BITMAP = 0,
    00023
    00025
    00028         EGFT_VECTOR,
    00029
    00031
    00032         EGFT_OS,
    00033
    00035         EGFT_CUSTOM
    00036 };
    00037
    00039 class IGUIFont : public virtual IReferenceCounted
    00040 {
    00041 public:
    00042
    00044
    00051         virtual void draw(const core::stringw& text, const core::rect<s32>& position,
    00052                 video::SColor color, bool hcenter=false, bool vcenter=false,
    00053                 const core::rect<s32>* clip=0) = 0;
    00054
    00056
    00058         virtual core::dimension2d<u32> getDimension(const wchar_t* text) const = 0;
    00059
    00061
    00065         virtual s32 getCharacterFromPos(const wchar_t* text, s32 pixel_x) const = 0;
    00066
    00068         virtual EGUI_FONT_TYPE getType() const { return EGFT_CUSTOM; }
    00069
    00071         virtual void setKerningWidth (s32 kerning) = 0;
    00072
    00074         virtual void setKerningHeight (s32 kerning) = 0;
    00075
    00077
    00087         virtual s32 getKerningWidth(const wchar_t* thisLetter=0, const wchar_t* previousLetter=0) const = 0;
    00088
    00090         virtual s32 getKerningHeight() const = 0;
    00091
    00093
    00097         virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
    00098 };
    00099
    00100 } // end namespace gui
    00101 } // end namespace irr
    00102
    00103 #endif
    00104

| The Irrlicht Engine Documentation © 2003-2010 by Nikolaus Gebhardt. Generated on Sun Feb 14 13:06:56 2010 by Doxygen (1.6.2)