MyGUI  3.2.1
MyGUI_TextView.h
Go to the documentation of this file.
00001 /*
00002  * This source file is part of MyGUI. For the latest info, see http://mygui.info/
00003  * Distributed under the MIT License
00004  * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
00005  */
00006 
00007 #ifndef __MYGUI_TEXT_VIEW_H__
00008 #define __MYGUI_TEXT_VIEW_H__
00009 
00010 #include "MyGUI_Prerequest.h"
00011 #include "MyGUI_TextureUtility.h"
00012 #include "MyGUI_TextViewData.h"
00013 #include "MyGUI_IFont.h"
00014 
00015 namespace MyGUI
00016 {
00017 
00018     class TextView
00019     {
00020     public:
00021         TextView();
00022 
00023         void update(const UString& _text, IFont* _font, int _height, Align _align, VertexColourType _format, int _maxWidth = -1);
00024 
00025         size_t getCursorPosition(const IntPoint& _value);
00026 
00027         IntPoint getCursorPoint(size_t _position);
00028 
00029         const IntSize& getViewSize() const;
00030 
00031         size_t getTextLength() const;
00032 
00033         const VectorLineInfo& getData() const;
00034 
00035     private:
00036         IntSize mViewSize;
00037         size_t mLength;
00038         VectorLineInfo mLineInfo;
00039         int mFontHeight;
00040     };
00041 
00042 } // namespace MyGUI
00043 
00044 #endif // __MYGUI_TEXT_VIEW_H__